Added support for buttons containing either a text or emoji label, this affects both Pages.categorize
and Pages.buttonize
methods.
This release also unifies the finalizer task scheduling on a single pool, which allows cancelling previous tasks mapped to the same ID (for example timeout refreshers). This change should reduce resource usage by the library.
WARNING: The methods Pages.categorize
and Pages.buttonize
now use Mapping
for button declaration instead of a regular Map
. The class' methods are the same as a map mostly, so simply renaming should work for current usages.
Changelist:
- Methods that accepted
Map<Emoji, V>
now useMapping<V>
instead, this is to allow Emote and String to be used simultaneously. Existing usages can be safely renamed to useMapping
as it shares the same methods as aMap
(but does not implement it). - Tasks are now managed by
TaskScheduler
, preventing two concurrent tasks running for the same message. EventHandler
event methods now accept a String instead of generating an ID from a Message, existing usages must useEventHandler.getEventId
to generate them manually.- Updated JDA version to 5.1.0.