Manages API methods for application commands and stores their cache.
Extends
CachedManager<Snowflake, ApplicationCommandScope, ApplicationCommandResolvable>| Name | Constraints | Optional | Default | Description |
|---|---|---|---|---|
| ApplicationCommandScope | Yes | ApplicationCommand<{ guild: GuildResolvable }> | None | |
| PermissionsOptionsExtras | Yes | { guild: GuildResolvable } | None | |
| PermissionsGuildType | Yes | null | None |
The cache of items for this manager.
Inherited from DataManagerThe client that instantiated this Manager
Inherited from BaseManagerThe data structure belonging to this manager.
Inherited from DataManagerpermissions:ApplicationCommandPermissionsManager<{ command?: ApplicationCommandResolvable } & PermissionsOptionsExtras, { command: ApplicationCommandResolvable } & PermissionsOptionsExtras, PermissionsGuildType, null>
The manager for permissions of arbitrary commands on arbitrary guilds
Creates an application command.
Example
| Name | Type | Optional | Description |
|---|---|---|---|
| command | ApplicationCommandDataResolvable | No | The command |
| guildId | Snowflake | Yes | The guild's id to create this command in, ignored when using a GuildApplicationCommandManager |
Deletes an application command.
Example
| Name | Type | Optional | Description |
|---|---|---|---|
| command | ApplicationCommandResolvable | No | The command to delete |
| guildId | Snowflake | Yes | The guild's id where the command is registered, ignored when using a GuildApplicationCommandManager |
Edits an application command.
Example
| Name | Type | Optional | Description |
|---|---|---|---|
| command | ApplicationCommandResolvable | No | The command to edit |
| data | Partial<ApplicationCommandDataResolvable> | No | The data to update the command with |
Obtains one or multiple application commands from Discord, or the cache if it's already available.
Example
Example
| Name | Type | Optional | Description |
|---|---|---|---|
| id | Snowflake | No | Options for fetching application command(s) |
| options | FetchApplicationCommandOptions & { guildId: Snowflake } | No | Additional options for this fetch |
Resolves a data entry to a data Object.
Returns
An instance from this Manager| Name | Type | Optional | Description |
|---|---|---|---|
| idOrInstance | Holds | No | The id or instance of something in this Manager |
Resolves a data entry to an instance id.
Returns
| Name | Type | Optional | Description |
|---|---|---|---|
| idOrInstance | Key | Holds | No | The id or instance of something in this Manager |
Sets all the commands for this application or guild.
Example
Example
| Name | Type | Optional | Description |
|---|---|---|---|
| commands | readonly ApplicationCommandDataResolvable[] | No | The commands |