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
name
stringThe name of this slash command.
description
stringThe description of this slash command.
isNsfw
boolWhether this command is marked as NSFW.
allowedContexts
InteractionContextType[]The allowed contexts of this slash command.
integrationTypes
ApplicationCommandIntegrationTypes[]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
name
stringThe name of this slash command.
description
stringThe description of this slash command.
defaultMemberPermissions
longThe default member permissions.
isNsfw
boolWhether this command is marked as NSFW.
allowedContexts
InteractionContextType[]The allowed contexts of this slash command.
integrationTypes
ApplicationCommandIntegrationTypes[]The allowed integration types.
SlashCommandAttribute(string, string, bool, bool, InteractionContextType[]?, ApplicationCommandIntegrationTypes[]?)
Marks this method as a slash command.
public SlashCommandAttribute(string name, string description, bool dmPermission, bool isNsfw = false, InteractionContextType[]? allowedContexts = null, ApplicationCommandIntegrationTypes[]? integrationTypes = null)
Parameters
name
stringThe name of this slash command.
description
stringThe description of this slash command.
dmPermission
boolThe dm permission.
isNsfw
boolWhether this command is marked as NSFW.
allowedContexts
InteractionContextType[]The allowed contexts of this slash command.
integrationTypes
ApplicationCommandIntegrationTypes[]The allowed integration types.
SlashCommandAttribute(string, string, long, bool, bool, InteractionContextType[]?, ApplicationCommandIntegrationTypes[]?)
Marks this method as a slash command.
public SlashCommandAttribute(string name, string description, long defaultMemberPermissions, bool dmPermission, bool isNsfw = false, InteractionContextType[]? allowedContexts = null, ApplicationCommandIntegrationTypes[]? integrationTypes = null)
Parameters
name
stringThe name of this slash command.
description
stringThe description of this slash command.
defaultMemberPermissions
longThe default member permissions.
dmPermission
boolThe dm permission.
isNsfw
boolWhether this command is marked as NSFW.
allowedContexts
InteractionContextType[]The allowed contexts of this slash command.
integrationTypes
ApplicationCommandIntegrationTypes[]The allowed integration types.