class ApplicationCommandsAPI

export declare class ApplicationCommandsAPI

Constructors

constructor(
rest: REST
)

Constructs a new instance of the ApplicationCommandsAPI class

deleteGlobalCommand(
applicationId: Snowflake
commandId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<void>

Deletes a global command

See also: https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command

deleteGuildCommand(
applicationId: Snowflake
guildId: Snowflake
commandId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<void>

Deletes a guild command

See also: https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command

getGuildCommand(
applicationId: Snowflake
guildId: Snowflake
commandId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<APIApplicationCommand>

Fetches a guild command

See also: https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command

getGuildCommandPermissions(
applicationId: Snowflake
guildId: Snowflake
commandId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<APIGuildApplicationCommandPermissions>

Fetches the permissions for a guild command

See also: https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions

getGuildCommandsPermissions(
applicationId: Snowflake
guildId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<RESTGetAPIGuildApplicationCommandsPermissionsResult>

Fetches all permissions for all commands in a guild

See also: https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions