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, options?):Promise<RESTPutAPIApplicationCommandsResult>
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id to overwrite commands for
bodyRESTPutAPIApplicationCommandsJSONBodyNo
The data for overwriting commands
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for overwriting commands
bulkOverwriteGuildCommands(applicationId, guildId, body, options?):Promise<RESTPutAPIApplicationGuildCommandsResult>
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id to overwrite commands for
guildIdSnowflakeNo
The guild id to overwrite commands for
bodyRESTPutAPIApplicationGuildCommandsJSONBodyNo
The data for overwriting commands
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for overwriting the commands
createGlobalCommand(applicationId, body, options?):Promise<APIApplicationCommand>
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id to create the command for
bodyRESTPostAPIApplicationCommandsJSONBodyNo
The data for creating the command
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for creating the command
createGuildCommand(applicationId, guildId, body, options?):Promise<RESTPostAPIApplicationGuildCommandsResult>
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id to create the command for
guildIdSnowflakeNo
The guild id to create the command for
bodyRESTPostAPIApplicationGuildCommandsJSONBodyNo
The data for creating the command
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for creating the command
deleteGlobalCommand(applicationId, commandId, options?):Promise<void>
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id of the command
commandIdSnowflakeNo
The id of the command to delete
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for deleting a command
deleteGuildCommand(applicationId, guildId, commandId, options?):Promise<void>
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id of the command
guildIdSnowflakeNo
The guild id of the command
commandIdSnowflakeNo
The id of the command to delete
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for deleting the command
editGlobalCommand(applicationId, commandId, body, options?):Promise<APIApplicationCommand>
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id of the command
commandIdSnowflakeNo
The id of the command to edit
bodyRESTPatchAPIApplicationCommandJSONBodyNo
The data for editing the command
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for editing the command
editGuildCommand(applicationId, guildId, commandId, body, options?):Promise<RESTPatchAPIApplicationGuildCommandResult>
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id of the command
guildIdSnowflakeNo
The guild id of the command
commandIdSnowflakeNo
The command id to edit
bodyRESTPatchAPIApplicationGuildCommandJSONBodyNo
The data for editing the command
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for editing the command
editGuildCommandPermissions(userToken, applicationId, guildId, commandId, body, options?):Promise<APIGuildApplicationCommandPermissions>
NameTypeOptionalDescription
userTokenstringNo
The token of the user to edit permissions on behalf of
applicationIdSnowflakeNo
The application id to edit the permissions for
guildIdSnowflakeNo
The guild id to edit the permissions for
commandIdSnowflakeNo
The id of the command to edit the permissions for
bodyRESTPutAPIApplicationCommandPermissionsJSONBodyNo
The data for editing the permissions
optionsPick<RequestData, 'signal'>Yes
The options for editing the permissions
getGlobalCommand(applicationId, commandId, options?):Promise<APIApplicationCommand>
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id to fetch the command from
commandIdSnowflakeNo
The command id to fetch
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the command
getGlobalCommands(applicationId, query?, options?):Promise<RESTGetAPIApplicationCommandsResult>
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id to fetch commands for
queryRESTGetAPIApplicationCommandsQueryYes
The query options for fetching commands
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching commands
getGuildCommand(applicationId, guildId, commandId, options?):Promise<RESTGetAPIApplicationGuildCommandResult>
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id to fetch the command from
guildIdSnowflakeNo
The guild id to fetch the command from
commandIdSnowflakeNo
The command id to fetch
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching the command
getGuildCommandPermissions(applicationId, guildId, commandId, options?):Promise<APIGuildApplicationCommandPermissions>
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id to get the permissions for
guildIdSnowflakeNo
The guild id of the command
commandIdSnowflakeNo
The command id to get the permissions for
optionsPick<RequestData, 'auth' | 'signal'>Yes
The option for fetching the command
getGuildCommands(applicationId, guildId, query?, options?):Promise<RESTGetAPIApplicationGuildCommandsResult>
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id to fetch commands for
guildIdSnowflakeNo
The guild id to fetch commands for
queryRESTGetAPIApplicationGuildCommandsQueryYes
The data for fetching commands
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching commands
getGuildCommandsPermissions(applicationId, guildId, options?):Promise<RESTGetAPIGuildApplicationCommandsPermissionsResult>
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id to get the permissions for
guildIdSnowflakeNo
The guild id to get the permissions for
optionsPick<RequestData, 'auth' | 'signal'>Yes
The options for fetching permissions