GlobalApplicationCommandManager class

An ApplicationCommandManager for an application's global commands.

Inheritance

Constructors

GlobalApplicationCommandManager(CacheConfig<ApplicationCommand> config, NyxxRest client, {required Snowflake applicationId})
Create a new GlobalApplicationCommandManager.

Properties

applicationId Snowflake
The ID of the application this manager is for.
finalinherited
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.
inherited
create(covariant ApplicationCommandBuilder builder) Future<ApplicationCommand>
Create a new instance of the type of this manager.
inherited
delete(Snowflake id) Future<void>
Delete the item with the given id from the API.
inherited
fetch(Snowflake id) Future<ApplicationCommand>
Fetch the item with the given id from the API.
inherited
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.
inherited
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.
inherited
parseApplicationCommandOption(Map<String, Object?> raw) CommandOption
Parse a CommandOption from raw.
inherited
parseOptionChoice(Map<String, Object?> raw) CommandOptionChoice
Parse a CommandOptionChoice from raw.
inherited
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.
inherited

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.
inherited