Messages¶
Messages are a central part of JDA-Commands, they include content send to the user via the reply API, strings used in framework annotations and modals and much more.
To provide the best user experience possible, JDA-Commands comes included with localization, support for placeholders and Unicode and app emojis. In many places in the framework, these feature are applied implicitly.
Resolution¶
The features listed above are all pipelined together with help of the MessageResolver.
They are applied to the string provided by the user in following order:
The resulting string is then send to discord or returned to the user.
Usage¶
Instead of manually using the MessageResolver class, JDA-Commands allows for implicit resolution of messages in many common please. These include:
- Component API including the corresponding annotations like @Button, @Modal etc.
- Embed API
- Reply API, for example the string content of a message Reply#reply(String, Entry...)
If you are using localization, please take a look at implicit localization.
Warning
Message resolution of content in MessageCreateData is not supported implicitly. You have to use MessageResolver to resolve such messages.