Skip to content

Pagination Utils 4.1.0 - Let there be text

Latest
Compare
Choose a tag to compare
@ygimenez ygimenez released this 25 Oct 16:20

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 use Mapping<V> instead, this is to allow Emote and String to be used simultaneously. Existing usages can be safely renamed to use Mapping as it shares the same methods as a Map (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 use EventHandler.getEventId to generate them manually.
  • Updated JDA version to 5.1.0.