ApplicationCommand class Entities Models

A command that can be executed by users and is displayed in the Discord client UI.

Also known as "Slash commands".

Inheritance

Properties

application → PartialApplication
The application this command belongs to.
no setter
applicationId → Snowflake
The ID of the application this command belongs to.
final
contexts → List<InteractionContextType>?
Interaction context(s) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands.
final
defaultMemberPermissions → Permissions?
The default permissions needed to execute this command.
final
description → String
The description of this command.
final
descriptionLocalizations → Map<Locale, String>?
A map of localizations for the description of this command.
final
guild → PartialGuild?
The guild this command belongs to.
no setter
guildId → Snowflake?
The ID of the guild this command belongs to.
final
hasDmPermission → bool?
Whether this command can be ran in DMs.
final
hashCode → int
The hash code for this object.
no setterinherited
id → Snowflake
The id of this entity.
finalinherited
integrationTypes → List<ApplicationIntegrationType>
Installation context(s) where the command is available, only for globally-scoped commands. Defaults to InteractionContextType.guild.
final
isNsfw → bool?
Whether this command is NSFW.
final
manager → ApplicationCommandManager
The manager for this entity.
finalinherited
name → String
The name of this command.
final
nameLocalizations → Map<Locale, String>?
A map of localizations for the name of this command.
final
options → List<CommandOption>?
A list of options for this command if this command has a type of ApplicationCommandType.chatInput.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → ApplicationCommandType
The type of this command.
final
version → Snowflake
An auto-incrementing version number.
final

Methods

defaultToString() → String
Same as toString, but only called when dart:mirrors is not available.
inherited
delete() → Future<void>
Delete this entity.
inherited
fetch() → Future<ApplicationCommand>
Fetch this entity from the API.
inherited
fetchPermissions(Snowflake guildId) → Future<CommandPermissions>
Fetch the permissions for this command in a given guild.
inherited
get() → Future<ApplicationCommand>
If this entity exists in the manager's cache, return the cached instance. Otherwise, fetch this entity and return it.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
update(covariant UpdateBuilder<ApplicationCommand> builder) → Future<ApplicationCommand>
Update this entity using the provided builder and return the updated entity.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited