ApplicationCommandsAPI
No summary provided.
constructor(rest)
Constructs a new instance of the
ApplicationCommandsAPI
className | Type | Optional | Description |
---|---|---|---|
rest | REST | No | None |
Overwrites global commands
Name | Type | Optional | Description |
---|---|---|---|
applicationId | Snowflake | No | The application id to overwrite commands for |
data | RESTPutAPIApplicationCommandsJSONBody | No | The data to use when overwriting commands |
bulkOverwriteGuildCommands(applicationId, guildId, data):Promise<RESTPutAPIApplicationCommandsResult>
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 |
data | RESTPutAPIApplicationCommandsJSONBody | No | The data to use when overwriting commands |
Creates a new global command
Name | Type | Optional | Description |
---|---|---|---|
applicationId | Snowflake | No | The application id to create the command for |
data | RESTPostAPIApplicationCommandsJSONBody | No | The data to use when creating the command |
createGuildCommand(applicationId, guildId, data):Promise<discord_api_types_v10.APIApplicationCommand>
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 |
data | RESTPostAPIApplicationCommandsJSONBody | No | The data to use when creating the command |
Deletes a global command
Deletes a guild command
editGlobalCommand(applicationId, commandId, data):Promise<discord_api_types_v10.APIApplicationCommand>
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 |
data | RESTPatchAPIApplicationCommandJSONBody | No | The data to use when editing the command |
editGuildCommand(applicationId, guildId, commandId, data):Promise<discord_api_types_v10.APIApplicationCommand>
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 |
data | RESTPatchAPIApplicationCommandJSONBody | No | The data to use when editing the command |
editGuildCommandPermissions(userToken, applicationId, guildId, commandId, data):Promise<discord_api_types_v10.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 |
data | RESTPutAPIApplicationCommandPermissionsJSONBody | No | The data to use when editing the permissions |
Fetches a global command
Fetches all global commands for a application
Name | Type | Optional | Description |
---|---|---|---|
applicationId | Snowflake | No | The application id to fetch commands for |
options | RESTGetAPIApplicationCommandsQuery | Yes | The options to use when fetching commands |
getGuildCommand(applicationId, guildId, commandId):Promise<discord_api_types_v10.APIApplicationCommand>
Fetches a guild command
getGuildCommandPermissions(applicationId, guildId, commandId):Promise<discord_api_types_v10.APIGuildApplicationCommandPermissions>
Fetches the permissions for a guild command
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 |
data | RESTGetAPIApplicationGuildCommandsQuery | Yes | The data to use when fetching commands |
getGuildCommandsPermissions(applicationId, guildId):Promise<RESTGetAPIGuildApplicationCommandsPermissionsResult>
Fetches all permissions for all commands in a guild