GuildLocaleProvider

@InterfacedService(acceptMultiple = false)
interface GuildLocaleProvider(source)

Provides the locale of a guild in a Discord interaction.

You may provide a custom implementation, for example, if a guild's locale depends on some external setting.

This returns interaction.getGuildLocale().toLocale() by default.

Usage

Register your instance as a service with @BService.

See also

Functions

Link copied to clipboard
abstract fun getLocale(interaction: Interaction): Locale