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
typeApplicationCommandTypeThe type of the context menu.
namestringThe name of the context menu.
isNsfwboolWhether the context menu is marked as NSFW.
allowedContextsInteractionContextType[]The allowed contexts of the context menu.
integrationTypesApplicationCommandIntegrationTypes[]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
typeApplicationCommandTypeThe type of the context menu.
namestringThe name of the context menu.
defaultMemberPermissionslongThe default member permissions of the context menu.
isNsfwboolWhether the context menu is marked as NSFW.
allowedContextsInteractionContextType[]The allowed contexts of the context menu.
integrationTypesApplicationCommandIntegrationTypes[]The allowed integration types of the context menu.