Skip to content

v3.0.0-alpha.22 | App emoji registry, QoL additions and fixes

Latest
Compare
Choose a tag to compare
@freya022 freya022 released this 29 Dec 20:23
· 13 commits to 3.X since this release
734bd68

JDA version

Overview

Added an application emoji registry, some quality of life additions and fixes.

Application emoji registry (opt-in, #221)

This adds support for automatic loading and setup of your bot's application emojis.
The emojis are loaded from the classpath, typically in your resources folder,
and are pushed to Discord before JDA logs in, meaning the emojis are always present when the bot can respond.

More details on the wiki.

New Features

  • Added a appEmojis configuration function
    • This is where you enable the application emoji registry and loading
    • Enable it with botcommands.app.emojis.enable in Spring properties
  • Added AppEmojisRegistry and
    • This is where you will get your emojis, after they are loaded
  • Added @AppEmojiContainer
    • Declares a class holding ApplicationEmoji properties
    • Java user can use eagerly-loaded emojis
    • Kotlin users can use both eager and lazy emojis

Breaking changes

Misc

  • Methods in AnnotationUtils visible to Java users now accepts KAnnotatedElement instead of AnnotatedElement
    • These methods were made to be used with functions managed by the framework, such as command functions, and are KFunctions

Changes

Dependencies

  • JDA: 5.2.1 -> 5.2.2

Run-time filters

  • Allowed using @Filter as a meta-annotation

New features

Application commands

  • Added ApplicationCommandsContext#findTopLevelSlashCommand
    • Gets a TopLevelSlashCommandInfo from a guild (or global scope) and name

Command introspection

  • Added a few helpers to retrieve annotations from command functions
    • Identical to the AnnotationUtils functions, but adding convenience

Event listeners

  • Added ignoredIntents to @BEventListener
    • Allows you to ignore specific missing intents for an event listener
    • This is useful especially for message listeners, where missing the DIRECT_MESSAGES intent can be intended

Bug fixes

Application commands

  • Fixed missing description on annotated commands
  • Fixed the default command cache on macOS (#223)

Run-time filters

  • Fixed detection of run-time filters when using Spring

Don't hesitate to check out the examples and the wiki.

Full Changelog: v3.0.0-alpha.21...v3.0.0-alpha.22