CreateApplicationCommand
Documentation / @discordeno/types / CreateApplicationCommand
Interface: CreateApplicationCommand
Defined in: discordeno/interactions.ts:105
- https://docs.discord.com/developers/interactions/application-commands#create-global-application-command-json-params
- https://docs.discord.com/developers/interactions/application-commands#create-guild-application-command-json-params
Properties
contexts?
optionalcontexts?:DiscordInteractionContextType[]
Defined in: discordeno/interactions.ts:157
Interaction context types where the command is available.
Remarks
This value is available only for globally-scoped commands.
defaultMemberPermissions?
optionaldefaultMemberPermissions?:string|null
Defined in: discordeno/interactions.ts:130
Set of permissions represented as a bit set
defaultPermission?
optionaldefaultPermission?:boolean
Defined in: discordeno/interactions.ts:142
Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild.
Default
true
description?
optionaldescription?:string
Defined in: discordeno/interactions.ts:119
1-100 character description
descriptionLocalizations?
optionaldescriptionLocalizations?:Partial<Record<Locales,string>> |null
Defined in: discordeno/interactions.ts:121
Localization object for the description field. Values follow the same restrictions as description
dmPermission?
optionaldmPermission?:boolean|null
Defined in: discordeno/interactions.ts:136
Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible.
Deprecated
use contexts instead
handler?
optionalhandler?:DiscordInteractionEntryPointCommandHandlerType
Defined in: discordeno/interactions.ts:169
Determines whether the interaction is handled by the app's interactions handler or by Discord
Remarks
This can only be set for application commands of type PRIMARY_ENTRY_POINT for applications with the EMBEDDED flag (i.e. applications that have an Activity).
integrationTypes?
optionalintegrationTypes?:DiscordApplicationIntegrationType[]
Defined in: discordeno/interactions.ts:150
Integration types where the command is available
Remarks
This value is available only for globally-scoped commands Defaults to the application configured contexts
name
name:
string
Defined in: discordeno/interactions.ts:115
Name of command, 1-32 characters.
Remarks
ApplicationCommandTypes.ChatInput command names must match the following regex ^[-_ʼ\p{L}\p{N}\p{sc=Deva}\p{sc=Thai}]{1,32}$ with the unicode flag set.
If there is a lowercase variant of any letters used, you must use those.
Characters with no lowercase variants and/or uncased letters are still allowed.
ApplicationCommandTypes.UserandApplicationCommandTypes.Message` commands may be mixed case and can include spaces.
nameLocalizations?
optionalnameLocalizations?:Partial<Record<Locales,string>> |null
Defined in: discordeno/interactions.ts:117
Localization object for the name field. Values follow the same restrictions as name
nsfw?
optionalnsfw?:boolean
Defined in: discordeno/interactions.ts:161
Indicates whether the command is age-restricted, defaults to false
options?
optionaloptions?:object[]
Defined in: discordeno/interactions.ts:128
Parameters for the command
autocomplete?
optionalautocomplete?:boolean
channelTypes?
optionalchannelTypes?:ChannelTypes[]
choices?
optionalchoices?:object[]
description
description:
string
descriptionLocalizations?
optionaldescriptionLocalizations?: {bg?:string;cs?:string;da?:string;de?:string;el?:string;en-GB?:string;en-US?:string;es-419?:string;es-ES?:string;fi?:string;fr?:string;hi?:string;hr?:string;hu?:string;id?:string;it?:string;ja?:string;ko?:string;lt?:string;nl?:string;no?:string;pl?:string;pt-BR?:string;ro?:string;ru?:string;sv-SE?:string;th?:string;tr?:string;uk?:string;vi?:string;zh-CN?:string;zh-TW?:string; } |null
maxLength?
optionalmaxLength?:number
maxValue?
optionalmaxValue?:number
minLength?
optionalminLength?:number
minValue?
optionalminValue?:number
name
name:
string
nameLocalizations?
optionalnameLocalizations?: {bg?:string;cs?:string;da?:string;de?:string;el?:string;en-GB?:string;en-US?:string;es-419?:string;es-ES?:string;fi?:string;fr?:string;hi?:string;hr?:string;hu?:string;id?:string;it?:string;ja?:string;ko?:string;lt?:string;nl?:string;no?:string;pl?:string;pt-BR?:string;ro?:string;ru?:string;sv-SE?:string;th?:string;tr?:string;uk?:string;vi?:string;zh-CN?:string;zh-TW?:string; } |null
options?
optionaloptions?: { type: ApplicationCommandOptionTypes; name: string; nameLocalizations?: { id?: string | undefined; da?: string | undefined; de?: string | undefined; ... 28 more ...; ko?: string | undefined; } | null | undefined; ... 10 more ...; autocomplete?: boolean | undefined; }[] | undefined
required?
optionalrequired?:boolean
type
Remarks
This is only valid in commands of type ChatInput
type?
optionaltype?:ApplicationCommandTypes
Defined in: discordeno/interactions.ts:159
Type of command, defaults ApplicationCommandTypes.ChatInput if not set