TextCommandLocaleProvider

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

Provides the locale to be used for localizing text command responses, may be useful if the user has set its own locale, for example.

It is recommended to override both getDiscordLocale and getLocale for best results, when using localization in events, and in TextLocalizationContext.

This returns Guild.getLocale by default.

Usage

Register your instance as a service with @BService or any annotation that enables your class for dependency injection.

See also

Functions

Link copied to clipboard
Link copied to clipboard