CreateSlashApplicationCommand
Documentation / @discordeno/bot / CreateSlashApplicationCommand
Interface: CreateSlashApplicationCommand
Defined in: packages/types/dist/types/discordeno.d.ts:356
https://discord.com/developers/docs/interactions/application-commands#endpoints-json-params
Properties
contexts?
optional
contexts:DiscordInteractionContextType
[]
Defined in: packages/types/dist/types/discordeno.d.ts:397
Interaction context types where the command is available.
Remarks
This value is available only for globally-scoped commands By default, all interaction context types are included for new commands
defaultMemberPermissions?
optional
defaultMemberPermissions: ("CREATE_INSTANT_INVITE"
|"KICK_MEMBERS"
|"BAN_MEMBERS"
|"ADMINISTRATOR"
|"MANAGE_CHANNELS"
|"MANAGE_GUILD"
|"ADD_REACTIONS"
|"VIEW_AUDIT_LOG"
|"PRIORITY_SPEAKER"
|"STREAM"
|"VIEW_CHANNEL"
|"SEND_MESSAGES"
|"SEND_TTS_MESSAGES"
|"MANAGE_MESSAGES"
|"EMBED_LINKS"
|"ATTACH_FILES"
|"READ_MESSAGE_HISTORY"
|"MENTION_EVERYONE"
|"USE_EXTERNAL_EMOJIS"
|"VIEW_GUILD_INSIGHTS"
|"CONNECT"
|"SPEAK"
|"MUTE_MEMBERS"
|"DEAFEN_MEMBERS"
|"MOVE_MEMBERS"
|"USE_VAD"
|"CHANGE_NICKNAME"
|"MANAGE_NICKNAMES"
|"MANAGE_ROLES"
|"MANAGE_WEBHOOKS"
|"MANAGE_GUILD_EXPRESSIONS"
|"USE_SLASH_COMMANDS"
|"REQUEST_TO_SPEAK"
|"MANAGE_EVENTS"
|"MANAGE_THREADS"
|"CREATE_PUBLIC_THREADS"
|"CREATE_PRIVATE_THREADS"
|"USE_EXTERNAL_STICKERS"
|"SEND_MESSAGES_IN_THREADS"
|"USE_EMBEDDED_ACTIVITIES"
|"MODERATE_MEMBERS"
|"VIEW_CREATOR_MONETIZATION_ANALYTICS"
|"USE_SOUNDBOARD"
|"CREATE_GUILD_EXPRESSIONS"
|"CREATE_EVENTS"
|"USE_EXTERNAL_SOUNDS"
|"SEND_VOICE_MESSAGES"
|"SEND_POLLS"
|"USE_EXTERNAL_APPS"
)[]
Defined in: packages/types/dist/types/discordeno.d.ts:381
Set of permissions represented as a bit set
description
description:
string
Defined in: packages/types/dist/types/discordeno.d.ts:368
1-100 character description
descriptionLocalizations?
optional
descriptionLocalizations:Partial
<Record
<Locales
,string
>>
Defined in: packages/types/dist/types/discordeno.d.ts:370
Localization object for the description
field. Values follow the same restrictions as description
dmPermission?
optional
dmPermission:boolean
Defined in: packages/types/dist/types/discordeno.d.ts:403
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?
optional
handler:DiscordInteractionEntryPointCommandHandlerType
Defined in: packages/types/dist/types/discordeno.d.ts:412
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?
optional
integrationTypes:DiscordApplicationIntegrationType
[]
Defined in: packages/types/dist/types/discordeno.d.ts:389
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: packages/types/dist/types/discordeno.d.ts:364
Name of command, 1-32 characters.
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.Userand
ApplicationCommandTypes.Message` commands may be mixed case and can include spaces.
nameLocalizations?
optional
nameLocalizations:Partial
<Record
<Locales
,string
>>
Defined in: packages/types/dist/types/discordeno.d.ts:366
Localization object for the name
field. Values follow the same restrictions as name
nsfw?
optional
nsfw:boolean
Defined in: packages/types/dist/types/discordeno.d.ts:405
Indicates whether the command is age-restricted, defaults to false
options?
optional
options:object
[]
Defined in: packages/types/dist/types/discordeno.d.ts:379
Parameters for the command
autocomplete?
optional
autocomplete:boolean
channelTypes?
optional
channelTypes:ChannelTypes
[]
choices?
optional
choices:object
[]
description
description:
string
descriptionLocalizations?
optional
descriptionLocalizations:null
| {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
; }
maxLength?
optional
maxLength:number
maxValue?
optional
maxValue:number
minLength?
optional
minLength:number
minValue?
optional
minValue:number
name
name:
string
nameLocalizations?
optional
nameLocalizations:null
| {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
; }
options?
optional
options: { type: ApplicationCommandOptionTypes; name: string; nameLocalizations?: { id?: string | undefined; da?: string | undefined; de?: string | undefined; ... 28 more ...; ko?: string | undefined; } | null | undefined; ... 10 more ...; maxLength?: number | undefined; }[] | undefined
required?
optional
required:boolean
type
Remarks
This is only valid in commands of type ChatInput
type?
optional
type:ApplicationCommandTypes
Defined in: packages/types/dist/types/discordeno.d.ts:372
Type of command, defaults ApplicationCommandTypes.ChatInput
if not set