Search...

ApplicationCommandsAPI

export declare class ApplicationCommandsAPI 
export declare class ApplicationCommandsAPI 

No summary provided.

constructor(rest)

Constructs a new instance of the ApplicationCommandsAPI class
NameTypeOptionalDescription
restRESTNoNone

bulkOverwriteGlobalCommands(applicationId, data)

:

Promise<RESTPutAPIApplicationCommandsResult>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id to overwrite commands for
dataRESTPutAPIApplicationCommandsJSONBodyNoThe data to use when overwriting commands

bulkOverwriteGuildCommands(applicationId, guildId, data)

:

Promise<RESTPutAPIApplicationCommandsResult>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id to overwrite commands for
guildIdSnowflakeNoThe guild id to overwrite commands for
dataRESTPutAPIApplicationCommandsJSONBodyNoThe data to use when overwriting commands

createGlobalCommand(applicationId, data)

:

Promise<import("discord-api-types/v10").APIApplicationCommand>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id to create the command for
dataRESTPostAPIApplicationCommandsJSONBodyNoThe data to use when creating the command

createGuildCommand(applicationId, guildId, data)

:

Promise<import("discord-api-types/v10").APIApplicationCommand>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id to create the command for
guildIdSnowflakeNoThe guild id to create the command for
dataRESTPostAPIApplicationCommandsJSONBodyNoThe data to use when creating the command

deleteGlobalCommand(applicationId, commandId)

:

Promise<void>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id of the command
commandIdSnowflakeNoThe id of the command to delete

deleteGuildCommand(applicationId, guildId, commandId)

:

Promise<void>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id of the command
guildIdSnowflakeNoThe guild id of the command
commandIdSnowflakeNoThe id of the command to delete

editGlobalCommand(applicationId, commandId, data)

:

Promise<import("discord-api-types/v10").APIApplicationCommand>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id of the command
commandIdSnowflakeNoThe id of the command to edit
dataRESTPatchAPIApplicationCommandJSONBodyNoThe data to use when editing the command

editGuildCommand(applicationId, guildId, commandId, data)

:

Promise<import("discord-api-types/v10").APIApplicationCommand>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id of the command
guildIdSnowflakeNoThe guild id of the command
commandIdSnowflakeNoThe command id to edit
dataRESTPatchAPIApplicationCommandJSONBodyNoThe data to use when editing the command

editGuildCommandPermissions(userToken, applicationId, guildId, commandId, data)

:

Promise<import("discord-api-types/v10").APIGuildApplicationCommandPermissions>

NameTypeOptionalDescription
userTokenstringNoThe token of the user to edit permissions on behalf of
applicationIdSnowflakeNoThe application id to edit the permissions for
guildIdSnowflakeNoThe guild id to edit the permissions for
commandIdSnowflakeNoThe id of the command to edit the permissions for
dataRESTPutAPIApplicationCommandPermissionsJSONBodyNoThe data to use when editing the permissions

getGlobalCommand(applicationId, commandId)

:

Promise<import("discord-api-types/v10").APIApplicationCommand>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id to fetch the command from
commandIdSnowflakeNoThe command id to fetch

getGlobalCommands(applicationId, options?)

:

Promise<RESTGetAPIApplicationCommandsResult>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id to fetch commands for
optionsRESTGetAPIApplicationCommandsQueryYesThe options to use when fetching commands

getGuildCommand(applicationId, guildId, commandId)

:

Promise<import("discord-api-types/v10").APIApplicationCommand>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id to fetch the command from
guildIdSnowflakeNoThe guild id to fetch the command from
commandIdSnowflakeNoThe command id to fetch

getGuildCommandPermissions(applicationId, guildId, commandId)

:

Promise<import("discord-api-types/v10").APIGuildApplicationCommandPermissions>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id to get the permissions for
guildIdSnowflakeNoThe guild id of the command
commandIdSnowflakeNoThe command id to get the permissions for

getGuildCommands(applicationId, guildId, data?)

:

Promise<RESTGetAPIApplicationCommandsResult>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id to fetch commands for
guildIdSnowflakeNoThe guild id to fetch commands for
dataRESTGetAPIApplicationGuildCommandsQueryYesThe data to use when fetching commands

getGuildCommandsPermissions(applicationId, guildId)

:

Promise<RESTGetAPIGuildApplicationCommandsPermissionsResult>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id to get the permissions for
guildIdSnowflakeNoThe guild id to get the permissions for