No summary provided.
Constructs a new instance of the
ApplicationCommandsAPI class| Name | Type | Optional | Description |
|---|---|---|---|
| rest | REST | No | None |
bulkOverwriteGlobalCommands(applicationId, body, options?):Promise<RESTPutAPIApplicationCommandsResult>
Overwrites global commands
| Name | Type | Optional | Description |
|---|---|---|---|
| applicationId | Snowflake | No | The application id to overwrite commands for |
| body | RESTPutAPIApplicationCommandsJSONBody | No | The data for overwriting commands |
| options | Pick<RequestData, 'signal'> | Yes | The options for overwriting commands |
bulkOverwriteGuildCommands(applicationId, guildId, body, options?):Promise<RESTPutAPIApplicationGuildCommandsResult>
Bulk overwrites guild commands
| Name | Type | Optional | Description |
|---|---|---|---|
| applicationId | Snowflake | No | The application id to overwrite commands for |
| guildId | Snowflake | No | The guild id to overwrite commands for |
| body | RESTPutAPIApplicationGuildCommandsJSONBody | No | The data for overwriting commands |
| options | Pick<RequestData, 'signal'> | Yes | The options for overwriting the commands |
Creates a new global command
| Name | Type | Optional | Description |
|---|---|---|---|
| applicationId | Snowflake | No | The application id to create the command for |
| body | RESTPostAPIApplicationCommandsJSONBody | No | The data for creating the command |
| options | Pick<RequestData, 'signal'> | Yes | The options for creating the command |
createGuildCommand(applicationId, guildId, body, options?):Promise<RESTPostAPIApplicationGuildCommandsResult>
Creates a new command for a guild
| Name | Type | Optional | Description |
|---|---|---|---|
| applicationId | Snowflake | No | The application id to create the command for |
| guildId | Snowflake | No | The guild id to create the command for |
| body | RESTPostAPIApplicationGuildCommandsJSONBody | No | The data for creating the command |
| options | Pick<RequestData, 'signal'> | Yes | The options for creating the command |
Deletes a global command
| Name | Type | Optional | Description |
|---|---|---|---|
| applicationId | Snowflake | No | The application id of the command |
| commandId | Snowflake | No | The id of the command to delete |
| options | Pick<RequestData, 'signal'> | Yes | The options for deleting a command |
Deletes a guild command
| Name | Type | Optional | Description |
|---|---|---|---|
| applicationId | Snowflake | No | The application id of the command |
| guildId | Snowflake | No | The guild id of the command |
| commandId | Snowflake | No | The id of the command to delete |
| options | Pick<RequestData, 'signal'> | Yes | The options for deleting the command |
Edits a global command
| Name | Type | Optional | Description |
|---|---|---|---|
| applicationId | Snowflake | No | The application id of the command |
| commandId | Snowflake | No | The id of the command to edit |
| body | RESTPatchAPIApplicationCommandJSONBody | No | The data for editing the command |
| options | Pick<RequestData, 'signal'> | Yes | The options for editing the command |
editGuildCommand(applicationId, guildId, commandId, body, options?):Promise<RESTPatchAPIApplicationGuildCommandResult>
Edits a guild command
| Name | Type | Optional | Description |
|---|---|---|---|
| applicationId | Snowflake | No | The application id of the command |
| guildId | Snowflake | No | The guild id of the command |
| commandId | Snowflake | No | The command id to edit |
| body | RESTPatchAPIApplicationGuildCommandJSONBody | No | The data for editing the command |
| options | Pick<RequestData, 'signal'> | Yes | The options for editing the command |
editGuildCommandPermissions(userToken, applicationId, guildId, commandId, body, options?):Promise<APIGuildApplicationCommandPermissions>
Edits the permissions for a guild command
| Name | Type | Optional | Description |
|---|---|---|---|
| userToken | string | No | The token of the user to edit permissions on behalf of |
| applicationId | Snowflake | No | The application id to edit the permissions for |
| guildId | Snowflake | No | The guild id to edit the permissions for |
| commandId | Snowflake | No | The id of the command to edit the permissions for |
| body | RESTPutAPIApplicationCommandPermissionsJSONBody | No | The data for editing the permissions |
| options | Pick<RequestData, 'signal'> | Yes | The options for editing the permissions |
Fetches a global command
| Name | Type | Optional | Description |
|---|---|---|---|
| applicationId | Snowflake | No | The application id to fetch the command from |
| commandId | Snowflake | No | The command id to fetch |
| options | Pick<RequestData, 'signal'> | Yes | The options for fetching the command |
Fetches all global commands for a application
| Name | Type | Optional | Description |
|---|---|---|---|
| applicationId | Snowflake | No | The application id to fetch commands for |
| query | RESTGetAPIApplicationCommandsQuery | Yes | The query options for fetching commands |
| options | Pick<RequestData, 'signal'> | Yes | The options for fetching commands |
getGuildCommand(applicationId, guildId, commandId, options?):Promise<RESTGetAPIApplicationGuildCommandResult>
Fetches a guild command
| Name | Type | Optional | Description |
|---|---|---|---|
| applicationId | Snowflake | No | The application id to fetch the command from |
| guildId | Snowflake | No | The guild id to fetch the command from |
| commandId | Snowflake | No | The command id to fetch |
| options | Pick<RequestData, 'signal'> | Yes | The options for fetching the command |
getGuildCommandPermissions(applicationId, guildId, commandId, options?):Promise<APIGuildApplicationCommandPermissions>
Fetches the permissions for a guild command
| Name | Type | Optional | Description |
|---|---|---|---|
| applicationId | Snowflake | No | The application id to get the permissions for |
| guildId | Snowflake | No | The guild id of the command |
| commandId | Snowflake | No | The command id to get the permissions for |
| options | Pick<RequestData, 'signal'> | Yes | The option for fetching the command |
getGuildCommands(applicationId, guildId, query?, options?):Promise<RESTGetAPIApplicationGuildCommandsResult>
Fetches all commands for a guild
| Name | Type | Optional | Description |
|---|---|---|---|
| applicationId | Snowflake | No | The application id to fetch commands for |
| guildId | Snowflake | No | The guild id to fetch commands for |
| query | RESTGetAPIApplicationGuildCommandsQuery | Yes | The data for fetching commands |
| options | Pick<RequestData, 'signal'> | Yes | The options for fetching commands |
getGuildCommandsPermissions(applicationId, guildId, options?):Promise<RESTGetAPIGuildApplicationCommandsPermissionsResult>
Fetches all permissions for all commands in a guild
| Name | Type | Optional | Description |
|---|---|---|---|
| applicationId | Snowflake | No | The application id to get the permissions for |
| guildId | Snowflake | No | The guild id to get the permissions for |
| options | Pick<RequestData, 'signal'> | Yes | The options for fetching permissions |