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
ApplicationCommandTypeThe type of the context menu.
name
stringThe name of the context menu.
isNsfw
boolWhether 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
ApplicationCommandTypeThe type of the context menu.
name
stringThe name of the context menu.
defaultMemberPermissions
longThe default member permissions of the context menu.
isNsfw
boolWhether 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
ApplicationCommandTypeThe type of the context menu.
name
stringThe name of the context menu.
dmPermission
boolThe dm permission of the context menu.
isNsfw
boolWhether 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
ApplicationCommandTypeThe type of the context menu.
name
stringThe name of the context menu.
defaultMemberPermissions
longThe default member permissions of the context menu.
dmPermission
boolThe dm permission of the context menu.
isNsfw
boolWhether 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.