ApplicationCommandManager class abstract
A Manager for ApplicationCommands.
GlobalApplicationCommandManager or GuildApplicationCommandManager will be used as concrete classes instead of this one depending on the circumstances.
- Inheritance
-
- Object
- ReadOnlyManager<
ApplicationCommand> - Manager<
ApplicationCommand> - ApplicationCommandManager
- Implementers
Constructors
-
ApplicationCommandManager(CacheConfig<
ApplicationCommand> config, NyxxRest client, {required Snowflake applicationId, required String identifier}) - Create a new ApplicationCommandManager.
Properties
- applicationId → Snowflake
-
The ID of the application this manager is for.
final
-
cache
→ Cache<
ApplicationCommand> -
The cache for this manager.
finalinherited
- client → NyxxRest
-
The client this manager belongs to.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
bulkOverride(
List< ApplicationCommandBuilder> builders) → Future<List< ApplicationCommand> > -
Remove all existing commands and replace them with the commands defined in
builders
. -
create(
covariant ApplicationCommandBuilder builder) → Future< ApplicationCommand> -
Create a new instance of the type of this manager.
override
-
delete(
Snowflake id) → Future< void> -
Delete the item with the given
id
from the API.override -
fetch(
Snowflake id) → Future< ApplicationCommand> -
Fetch the item with the given
id
from the API.override -
get(
Snowflake id) → Future< ApplicationCommand> -
Get an item by its
id
from the cache if it exists, else fetch it from the API.inherited -
list(
{bool? withLocalizations}) → Future< List< ApplicationCommand> > - List the commands belonging to the application.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
Map< String, Object?> raw) → ApplicationCommand -
Parse the
raw
data received from the API into an instance of the type of this manager.override -
parseApplicationCommandOption(
Map< String, Object?> raw) → CommandOption -
Parse a CommandOption from
raw
. -
parseOptionChoice(
Map< String, Object?> raw) → CommandOptionChoice -
Parse a CommandOptionChoice from
raw
. -
toString(
) → String -
A string representation of this object.
inherited
-
update(
Snowflake id, covariant ApplicationCommandUpdateBuilder builder) → Future< ApplicationCommand> -
Update the item with the given
id
in the API.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
Snowflake id) → PartialApplicationCommand -
Return a partial instance of the entity with ID
id
containing no data.override