Base Command Event
Event for regex-based text commands.
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.
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.
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.
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.
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.