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, body, { signal }?)

:

Promise<RESTPutAPIApplicationCommandsResult>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id to overwrite commands for
bodyRESTPutAPIApplicationCommandsJSONBodyNoThe data to use when overwriting commands
{ signal }Pick<RequestData, 'signal'>YesNone

bulkOverwriteGuildCommands(applicationId, guildId, body, { signal }?)

:

Promise<RESTPutAPIApplicationCommandsResult>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id to overwrite commands for
guildIdSnowflakeNoThe guild id to overwrite commands for
bodyRESTPutAPIApplicationCommandsJSONBodyNoThe data to use when overwriting commands
{ signal }Pick<RequestData, 'signal'>YesNone

createGlobalCommand(applicationId, body, { signal }?)

:

Promise<APIApplicationCommand>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id to create the command for
bodyRESTPostAPIApplicationCommandsJSONBodyNoThe data to use when creating the command
{ signal }Pick<RequestData, 'signal'>YesNone

createGuildCommand(applicationId, guildId, body, { signal }?)

:

Promise<APIApplicationCommand>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id to create the command for
guildIdSnowflakeNoThe guild id to create the command for
bodyRESTPostAPIApplicationCommandsJSONBodyNoThe data to use when creating the command
{ signal }Pick<RequestData, 'signal'>YesNone

deleteGlobalCommand(applicationId, commandId, { signal }?)

:

Promise<void>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id of the command
commandIdSnowflakeNoThe id of the command to delete
{ signal }Pick<RequestData, 'signal'>YesNone

deleteGuildCommand(applicationId, guildId, commandId, { signal }?)

:

Promise<void>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id of the command
guildIdSnowflakeNoThe guild id of the command
commandIdSnowflakeNoThe id of the command to delete
{ signal }Pick<RequestData, 'signal'>YesNone

editGlobalCommand(applicationId, commandId, body, { signal }?)

:

Promise<APIApplicationCommand>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id of the command
commandIdSnowflakeNoThe id of the command to edit
bodyRESTPatchAPIApplicationCommandJSONBodyNoThe data to use when editing the command
{ signal }Pick<RequestData, 'signal'>YesNone

editGuildCommand(applicationId, guildId, commandId, body, { signal }?)

:

Promise<APIApplicationCommand>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id of the command
guildIdSnowflakeNoThe guild id of the command
commandIdSnowflakeNoThe command id to edit
bodyRESTPatchAPIApplicationCommandJSONBodyNoThe data to use when editing the command
{ signal }Pick<RequestData, 'signal'>YesNone

editGuildCommandPermissions(userToken, applicationId, guildId, commandId, body, { signal }?)

:

Promise<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
bodyRESTPutAPIApplicationCommandPermissionsJSONBodyNoThe data to use when editing the permissions
{ signal }Pick<RequestData, 'signal'>YesNone

getGlobalCommand(applicationId, commandId, { signal }?)

:

Promise<APIApplicationCommand>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id to fetch the command from
commandIdSnowflakeNoThe command id to fetch
{ signal }Pick<RequestData, 'signal'>YesNone

getGlobalCommands(applicationId, query?, { signal }?)

:

Promise<RESTGetAPIApplicationCommandsResult>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id to fetch commands for
queryRESTGetAPIApplicationCommandsQueryYesThe query options to use when fetching commands
{ signal }Pick<RequestData, 'signal'>YesNone

getGuildCommand(applicationId, guildId, commandId, { signal }?)

:

Promise<APIApplicationCommand>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id to fetch the command from
guildIdSnowflakeNoThe guild id to fetch the command from
commandIdSnowflakeNoThe command id to fetch
{ signal }Pick<RequestData, 'signal'>YesNone

getGuildCommandPermissions(applicationId, guildId, commandId, { signal }?)

:

Promise<APIGuildApplicationCommandPermissions>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id to get the permissions for
guildIdSnowflakeNoThe guild id of the command
commandIdSnowflakeNoThe command id to get the permissions for
{ signal }Pick<RequestData, 'signal'>YesNone

getGuildCommands(applicationId, guildId, query?, { signal }?)

:

Promise<RESTGetAPIApplicationCommandsResult>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id to fetch commands for
guildIdSnowflakeNoThe guild id to fetch commands for
queryRESTGetAPIApplicationGuildCommandsQueryYesThe data to use when fetching commands
{ signal }Pick<RequestData, 'signal'>YesNone

getGuildCommandsPermissions(applicationId, guildId, { signal }?)

:

Promise<RESTGetAPIGuildApplicationCommandsPermissionsResult>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id to get the permissions for
guildIdSnowflakeNoThe guild id to get the permissions for
{ signal }Pick<RequestData, 'signal'>YesNone