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 |
Constructs a new instance of the
ApplicationCommandManager
className | Type | Optional | Description |
---|---|---|---|
client | Client<true> | No | None |
iterable | Iterable<unknown> | Yes | 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.
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.
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.
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.
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 ManagerName | 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 | K | Holds | No | The id or instance of something in this Manager |
Sets all the commands for this application or guild.
Name | Type | Optional | Description |
---|---|---|---|
commands | readonly ApplicationCommandDataResolvable[] | No | The commands |