Interface ApplicationCommand

interface ApplicationCommand {
    application_id: string;
    contexts?: InteractionContextType[];
    default_member_permissions: string;
    description: string;
    description_localizations?: ApplicationCommandLocalization;
    dm_permission?: boolean;
    guild_id?: string;
    id: string;
    integration_types?: IntegrationType[];
    name: string;
    name_localization?: ApplicationCommandLocalization;
    nsfw?: boolean;
    options?: ApplicationCommandOptions[];
    type?: ApplicationCommandType;
    version: string;
}

Properties

application_id: string

application_id ID of the parent application

Returns

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

Returns

default_member_permissions: string

default_member_permissions Set of permissions represented as a bit set

Returns

string

description: string

description Description for CHAT_INPUT commands, 1-100 characters. Empty string for USER and MESSAGE commands

Returns

string

description_localizations?: ApplicationCommandLocalization

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

Returns

dm_permission?: boolean

dm_permission Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible.

Returns

boolean

guild_id?: string

guild_id Guild ID of the command, if not global

Returns

id: string

id Unique ID of command

Returns

integration_types?: IntegrationType[]

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

Returns

name: string

name Name of command, 1-32 characters

Returns

string

name_localization?: ApplicationCommandLocalization

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

Returns

nsfw?: boolean

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

Returns

boolean

options Parameters for the command, max of 25

Returns

type Type of command, defaults to 1

Returns

version: string

version Autoincrementing version identifier updated during substantial record changes

Returns

Generated using TypeDoc