Constructor SlashCommandAttribute
- Namespace
- DisCatSharp.ApplicationCommands.Attributes
- Assembly
- DisCatSharp.ApplicationCommands.dll
SlashCommandAttribute(string, string, bool, InteractionContextType[]?, ApplicationCommandIntegrationTypes[]?)
Marks this method as a slash command.
public SlashCommandAttribute(string name, string description, bool isNsfw = false, InteractionContextType[]? allowedContexts = null, ApplicationCommandIntegrationTypes[]? integrationTypes = null)
Parameters
namestringThe name of this slash command.
descriptionstringThe description of this slash command.
isNsfwboolWhether this command is marked as NSFW.
allowedContextsInteractionContextType[]The allowed contexts of this slash command.
integrationTypesApplicationCommandIntegrationTypes[]The allowed integration types.
SlashCommandAttribute(string, string, long, bool, InteractionContextType[]?, ApplicationCommandIntegrationTypes[]?)
Marks this method as a slash command.
public SlashCommandAttribute(string name, string description, long defaultMemberPermissions, bool isNsfw = false, InteractionContextType[]? allowedContexts = null, ApplicationCommandIntegrationTypes[]? integrationTypes = null)
Parameters
namestringThe name of this slash command.
descriptionstringThe description of this slash command.
defaultMemberPermissionslongThe default member permissions.
isNsfwboolWhether this command is marked as NSFW.
allowedContextsInteractionContextType[]The allowed contexts of this slash command.
integrationTypesApplicationCommandIntegrationTypes[]The allowed integration types.