Skip to content

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:

  1. resolution of placeholders
  2. localization
  3. resolution of emoji aliases

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:

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.