Constructor DiscordApplicationCommand
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
DiscordApplicationCommand(string, string?, IEnumerable<DiscordApplicationCommandOption>?, ApplicationCommandType, DiscordApplicationCommandLocalization?, DiscordApplicationCommandLocalization?, Permissions?, bool?, bool, List<InteractionContextType>?, List<ApplicationCommandIntegrationTypes>?)
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? dmPermission = null, bool isNsfw = false, List<InteractionContextType>? allowedContexts = null, List<ApplicationCommandIntegrationTypes>? integrationTypes = null)
Parameters
name
stringThe name of the command.
description
stringThe description of the command.
options
IEnumerable<DiscordApplicationCommandOption>Optional parameters for this command.
type
ApplicationCommandTypeThe type of the command. Defaults to ChatInput.
nameLocalizations
DiscordApplicationCommandLocalizationThe localizations of the command name.
descriptionLocalizations
DiscordApplicationCommandLocalizationThe localizations of the command description.
defaultMemberPermissions
Permissions?The default member permissions.
dmPermission
bool?The dm permission.
isNsfw
boolWhether this command is NSFW.
allowedContexts
List<InteractionContextType>Where the command can be used.
integrationTypes
List<ApplicationCommandIntegrationTypes>The allowed integration types.