Package-level declarations

Types

Link copied to clipboard
@InterfacedService(acceptMultiple = false)
interface GuildLocaleProvider

Provides the locale of a guild in a Discord interaction, may be useful if the guild has set its own locale, for example.

Link copied to clipboard

Allows editing an interaction's original message using localized strings, registered from bundles in BLocalizationConfig.responseBundles.

Link copied to clipboard

Allows you to configure the localization settings of this interaction event, retrieve a LocalizableInteractionHook, as well as retrieve a localization context from it.

Link copied to clipboard

Allows sending follow-ups to interactions using localized strings, registered from bundles in BLocalizationConfig.responseBundles.

Link copied to clipboard

Allows replying to interactions using localized strings, registered from bundles in BLocalizationConfig.responseBundles.

Link copied to clipboard
@InterfacedService(acceptMultiple = false)
interface UserLocaleProvider

Provides the locale of a user in a Discord interaction, may be useful if the user has set its own locale, for example.

Functions

Link copied to clipboard

Edits the original message with the localized message at the following path, using the guild's locale and provided parameters.

Link copied to clipboard
fun LocalizableEditCallback.editLocalized(locale: Locale, localizationPath: String, vararg entries: PairEntry): MessageEditCallbackAction

Edits the original message with the localized message at the following path, using the provided locale and parameters.

Link copied to clipboard

Edits the original message with the localized message at the following path, using the user's locale and provided parameters.

Link copied to clipboard
fun LocalizableInteraction.getGuildMessage(localizationPath: String, vararg entries: PairEntry): String

Returns the localized message at the following path, using the guild's locale and parameters.

Link copied to clipboard
fun LocalizableInteraction.getUserMessage(localizationPath: String, vararg entries: PairEntry): String

Returns the localized message at the following path, using the user's locale and parameters.

Link copied to clipboard

Replies with the localized message at the following path, using the guild's locale and provided parameters.

Link copied to clipboard
fun LocalizableReplyCallback.replyLocalized(locale: Locale, localizationPath: String, vararg entries: PairEntry): ReplyCallbackAction

Replies with the localized message at the following path, using the provided locale and parameters.

Link copied to clipboard
fun LocalizableReplyCallback.replyUser(localizationPath: String, vararg entries: PairEntry): ReplyCallbackAction

Replies with the localized message at the following path, using the user's locale and provided parameters.

Link copied to clipboard

Sends a follow-up with the localized message at the following path, using the guild's locale and provided parameters.

Link copied to clipboard

Sends a follow-up with the localized message at the following path, using the provided locale and parameters.

Link copied to clipboard

Sends a follow-up with the localized message at the following path, using the user's locale and provided parameters.