Skip to main content

CreateSlashApplicationCommand

@discordeno/botDocs


Documentation / @discordeno/bot / CreateSlashApplicationCommand

Interface: CreateSlashApplicationCommand

https://discord.com/developers/docs/interactions/application-commands#endpoints-json-params

Properties

contexts?

optional contexts: DiscordInteractionContextType[]

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

Defined in

packages/types/dist/types/discordeno.d.ts:397


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")[]

Set of permissions represented as a bit set

Defined in

packages/types/dist/types/discordeno.d.ts:381


description

description: string

1-100 character description

Defined in

packages/types/dist/types/discordeno.d.ts:368


descriptionLocalizations?

optional descriptionLocalizations: Partial<Record<Locales, string>>

Localization object for the description field. Values follow the same restrictions as description

Defined in

packages/types/dist/types/discordeno.d.ts:370


dmPermission?

optional dmPermission: boolean

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

Defined in

packages/types/dist/types/discordeno.d.ts:403


handler?

optional handler: DiscordInteractionEntryPointCommandHandlerType

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).

Defined in

packages/types/dist/types/discordeno.d.ts:412


integrationTypes?

optional integrationTypes: DiscordApplicationIntegrationType[]

Integration types where the command is available

Remarks

This value is available only for globally-scoped commands Defaults to the application configured contexts

Defined in

packages/types/dist/types/discordeno.d.ts:389


name

name: string

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.UserandApplicationCommandTypes.Message` commands may be mixed case and can include spaces.

Defined in

packages/types/dist/types/discordeno.d.ts:364


nameLocalizations?

optional nameLocalizations: Partial<Record<Locales, string>>

Localization object for the name field. Values follow the same restrictions as name

Defined in

packages/types/dist/types/discordeno.d.ts:366


nsfw?

optional nsfw: boolean

Indicates whether the command is age-restricted, defaults to false

Defined in

packages/types/dist/types/discordeno.d.ts:405


options?

optional options: object[]

Parameters for the command

Remarks

This is only valid in commands of type ChatInput

Defined in

packages/types/dist/types/discordeno.d.ts:379


type?

optional type: ApplicationCommandTypes

Type of command, defaults ApplicationCommandTypes.ChatInput if not set

Defined in

packages/types/dist/types/discordeno.d.ts:372