Constructor DiscordApplicationCommand
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
DiscordApplicationCommand(string, string?, IEnumerable<DiscordApplicationCommandOption>?, ApplicationCommandType, DiscordApplicationCommandLocalization?, DiscordApplicationCommandLocalization?, Permissions?, bool, List<InteractionContextType>?, List<ApplicationCommandIntegrationTypes>?, ApplicationCommandHandlerType?)
Creates a new instance of a DiscordApplicationCommand.
public DiscordApplicationCommand(string name, string? description, IEnumerable<DiscordApplicationCommandOption>? options = null, ApplicationCommandType type = ApplicationCommandType.ChatInput, DiscordApplicationCommandLocalization? nameLocalizations = null, DiscordApplicationCommandLocalization? descriptionLocalizations = null, Permissions? defaultMemberPermissions = null, bool isNsfw = false, List<InteractionContextType>? allowedContexts = null, List<ApplicationCommandIntegrationTypes>? integrationTypes = null, ApplicationCommandHandlerType? handlerType = null)
Parameters
namestringThe name of the command.
descriptionstringThe description of the command.
optionsIEnumerable<DiscordApplicationCommandOption>Optional parameters for this command.
typeApplicationCommandTypeThe type of the command. Defaults to ChatInput.
nameLocalizationsDiscordApplicationCommandLocalizationThe localizations of the command name.
descriptionLocalizationsDiscordApplicationCommandLocalizationThe localizations of the command description.
defaultMemberPermissionsPermissions?The default member permissions.
isNsfwboolWhether this command is NSFW.
allowedContextsList<InteractionContextType>Where the command can be used.
integrationTypesList<ApplicationCommandIntegrationTypes>The allowed integration types.
handlerTypeApplicationCommandHandlerType?The handler type.