DefaultBotCommandsMessagesFactory
Default implementation of BotCommandsMessagesFactory.
Instances returned by this factory are DefaultBotCommandsMessages, which uses LocalizationService to get a localization bundle using the provided bundleName.
By default, an instance of this factory is registered using the default bundle name (BotCommandsMessages
), you can override the default factory by providing a corresponding service factory.
Light customization / Supporting more locales
With the default values, the localization templates would be loaded from /bc_localization/BotCommandsMessages-default.json
, you may change the values by creating a new BotCommandsMessages.json
, you can also support more locales following by appending an underscore and the language tag, such as BotCommandsMessages_fr.json
.
The localization paths must be identical to those used by DefaultBotCommandsMessages, but the placeholders can be modified but must keep the same names, they can also be removed.
Refer to Localization for mode customization details.
See also
Constructors
Functions
Retrieves a BotCommandsMessages instance for the given locale.
Retrieves a BotCommandsMessages instance, with the locale derived from this event.
Retrieves a BotCommandsMessages instance, with the locale derived from this interaction.