Command Event
Event for fallback text commands.
Arguments are tokenized and resolved into entities if possible
Localization
You can send localized replies using the user, guild and also any [Locale], by using this event directly, see LocalizableTextCommand for more details and configuration.An alternative to using this event is injecting an TextLocalizationContext in a parameter, or retrieving one using getLocalizationContext.
In both cases, you can configure the locale, using TextCommandLocaleProvider.
Rate limit cancellation
Although it is recommended to reject commands using TextCommandFilter, you can also return the bucket token with cancelRateLimit if you want to avoid consuming bandwidth in certain conditions.Constructors
Properties
Functions
Cancels the token consumption of the current rate limited interaction.
Throwable consumer that, when triggered, sends an error message to the event's GuildMessageChannel and to the bot owner with the exception name and the simple exception description
Returns the unresolved arguments of the command event
Returns the best author name possible
Returns the default embed, equivalent to BContext.getDefaultEmbedSupplier().get()
Returns the default embed footer icon, equivalent to BContext.getDefaultFooterIconSupplier().get()
Retrieves a DefaultMessages instance, using a locale suitable for messages sent to the user.
Returns the localized message at the following path, using the guild's locale and provided parameters.
Returns the localized message at the following path, using the guild's locale and provided parameters.
If set, forces the specified localization bundle to be used.
Returns a localization context for the provided bundle name and path prefix.
Returns a localization context for the provided bundle name and path prefix, using the locale from TextCommandLocaleProvider.getDiscordLocale.
If set, adds the specified prefix to the path of every localization call, useful to avoid using very long strings in every reply/edit.
Returns the localized message at the following path, using the provided locale and parameters.
Sends an error reply in the event's channel
Add a :x: reaction on the event message to indicate a command error
Add a :white_check_mark: reaction on the event message to indicate command success
Sends a reply in the event's channel
Sends a file as a reply in the event's channel
Sends a reply in the event's channel
Replies with the localized message at the following path, using the guild's locale and provided parameters.
Replies with the localized message at the following path, using the guild's locale and provided parameters.
Replies with the localized message at the following path, using the provided locale and parameters.
Replies a localized message to the user's command.
Replies with the localized message at the following path, using the provided locale and parameters.
Send an error message to the event's GuildMessageChannel and to the bot owner with the exception name and the simple exception description
Sends a response in the event's channel
Sends a file as a response in the event's channel
Sends a response in the event's channel
Responds with the localized message at the following path, using the guild's locale and provided parameters.
Responds with the localized message at the following path, using the guild's locale and provided parameters.
Responds with the localized message at the following path, using the provided locale and parameters.
Sends a localized message to the event's channel.
Responds with the localized message at the following path, using the provided locale and parameters.
Sends a MessageEmbed on the event's channel with the default footer icon
If set, forces the specified localization bundle to be used.
If set, adds the specified prefix to the path of every localization call, useful to avoid using very long strings in every reply/edit.