Table of Contents

Constructor ContextMenuAttribute

Namespace
DisCatSharp.ApplicationCommands.Attributes
Assembly
DisCatSharp.ApplicationCommands.dll

ContextMenuAttribute(ApplicationCommandType, string, bool, InteractionContextType[]?, ApplicationCommandIntegrationTypes[]?)

Marks this method as a context menu.

public ContextMenuAttribute(ApplicationCommandType type, string name, bool isNsfw = false, InteractionContextType[]? allowedContexts = null, ApplicationCommandIntegrationTypes[]? integrationTypes = null)

Parameters

type ApplicationCommandType

The type of the context menu.

name string

The name of the context menu.

isNsfw bool

Whether the context menu is marked as NSFW.

allowedContexts InteractionContextType[]

The allowed contexts of the context menu.

integrationTypes ApplicationCommandIntegrationTypes[]

The allowed integration types of the context menu.

ContextMenuAttribute(ApplicationCommandType, string, long, bool, InteractionContextType[]?, ApplicationCommandIntegrationTypes[]?)

Marks this method as a context menu.

public ContextMenuAttribute(ApplicationCommandType type, string name, long defaultMemberPermissions, bool isNsfw = false, InteractionContextType[]? allowedContexts = null, ApplicationCommandIntegrationTypes[]? integrationTypes = null)

Parameters

type ApplicationCommandType

The type of the context menu.

name string

The name of the context menu.

defaultMemberPermissions long

The default member permissions of the context menu.

isNsfw bool

Whether the context menu is marked as NSFW.

allowedContexts InteractionContextType[]

The allowed contexts of the context menu.

integrationTypes ApplicationCommandIntegrationTypes[]

The allowed integration types of the context menu.

ContextMenuAttribute(ApplicationCommandType, string, bool, bool, InteractionContextType[]?, ApplicationCommandIntegrationTypes[]?)

Marks this method as context menu.

public ContextMenuAttribute(ApplicationCommandType type, string name, bool dmPermission, bool isNsfw = false, InteractionContextType[]? allowedContexts = null, ApplicationCommandIntegrationTypes[]? integrationTypes = null)

Parameters

type ApplicationCommandType

The type of the context menu.

name string

The name of the context menu.

dmPermission bool

The dm permission of the context menu.

isNsfw bool

Whether the context menu is marked as NSFW.

allowedContexts InteractionContextType[]

The allowed contexts of the context menu.

integrationTypes ApplicationCommandIntegrationTypes[]

The allowed integration types of the context menu.

ContextMenuAttribute(ApplicationCommandType, string, long, bool, bool, InteractionContextType[]?, ApplicationCommandIntegrationTypes[]?)

Marks this method as a context menu.

public ContextMenuAttribute(ApplicationCommandType type, string name, long defaultMemberPermissions, bool dmPermission, bool isNsfw = false, InteractionContextType[]? allowedContexts = null, ApplicationCommandIntegrationTypes[]? integrationTypes = null)

Parameters

type ApplicationCommandType

The type of the context menu.

name string

The name of the context menu.

defaultMemberPermissions long

The default member permissions of the context menu.

dmPermission bool

The dm permission of the context menu.

isNsfw bool

Whether the context menu is marked as NSFW.

allowedContexts InteractionContextType[]

The allowed contexts of the context menu.

integrationTypes ApplicationCommandIntegrationTypes[]

The allowed integration types of the context menu.