Skip to content

Conversation

@freya022
Copy link
Owner

DefaultMessages and DefaultMessagesFactory are deprecated in favor of:

  • BotCommandsMessages for the messages used by the framework
  • PermissionLocalization for DefaultMessage#getPermission

Deprecation process

If a non-default configuration of DefaultMessages is detected, the auto-configured BotCommandsMessagesFactory instance will delegate to it instead, and a warn will be logged.

Differences

BotCommandsMessages is similar to DefaultMessages, however:

  • The template keys have been changed as to allow nesting in some cases
  • Each method returns a MessageCreateData instead of a String, allowing you to fully customize the responses (such as by using Components V2 👀)
  • The method names were shortened

The default strings were unchanged.

Migration process

If you made DefaultMessages[language].json files, you will need to replace DefaultMessages by BotCommandsMessages, then migrate the keys to the new ones found in BotCommandsMessages-default.json.

@freya022 freya022 added this to the v3.0 milestone Jun 22, 2025
@freya022 freya022 marked this pull request as ready for review June 22, 2025 15:48
@freya022 freya022 merged commit 758d905 into 3.X-dev Jun 23, 2025
@freya022 freya022 deleted the feature/builtin-replies branch June 23, 2025 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants