Skip to main content
Version: 0.37.114

RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody

Hierarchy

  • RESTPostAPIBaseApplicationCommandsJSONBody
    • RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody

Index

Properties

optionalinheritedcontexts

contexts?: AddUndefinedToPossiblyUndefinedPropertiesOfInterface<InteractionContextType>[]

Interaction context(s) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands [0,1,2].

optionalinheriteddefault_member_permissions

default_member_permissions?: null | string

Set of permissions represented as a bitset

optionalinheriteddefault_permission

default_permission?: boolean

Whether the command is enabled by default when the app is added to a guild

If missing, this property should be assumed as true

@deprecated

Use dm_permission and/or default_member_permissions instead

optionalinheriteddescription_localizations

description_localizations?: null | AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Partial<Record<Locale, null | string>>>

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

optionalinheriteddm_permission

dm_permission?: 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

optionalinheritedhandler

handler?: AppHandler | DiscordLaunchActivity

Determines whether the interaction is handled by the app's interactions handler or by Discord

@remarks

This is only available for ApplicationCommandType.PrimaryEntryPoint commands

optionalinheritedintegration_types

integration_types?: AddUndefinedToPossiblyUndefinedPropertiesOfInterface<ApplicationIntegrationType>[]

Installation context(s) where the command is available, only for globally-scoped commands. Defaults to GUILD_INSTALL ([0])

inheritedname

name: string

1-32 character name; CHAT_INPUT command names must be all lowercase matching ^[-_\p{L}\p{N}\p{sc=Deva}\p{sc=Thai}]{1,32}$

optionalinheritedname_localizations

name_localizations?: null | AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Partial<Record<Locale, null | string>>>

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

optionalinheritednsfw

nsfw?: boolean

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

optionalinheritedoptions

options?: AddUndefinedToPossiblyUndefinedPropertiesOfInterface<APIApplicationCommandOption>[]

The parameters for the CHAT_INPUT command, max 25

type

type: PrimaryEntryPoint