ygimenez / Pagination-Utils

A collection of methods to make message pagination with JDA easier.
GNU Lesser General Public License v2.1
27 stars 7 forks source link

custom reactions don't work #40

Closed avurro closed 2 years ago

avurro commented 2 years ago

Checklist

Make sure that you've checked all the items below.

Library info

What libraries versions are you using.

Describe the bug

Everything works perfectly if I use the standard arrows. But if I set custom emoji it doesn't work.

To Reproduce

set custom emojis, for example: Paginator paginator = PaginatorBuilder.createPaginator().setHandler(jda) .shouldRemoveOnReact(true) .setEmote(Emote.GOTO_FIRST,"<:first:809233195354685480>") .setEmote(Emote.PREVIOUS,"<:previous:809233195303436298>") .setEmote(Emote.GOTO_LAST,"<:last:809233195181670410>") .setEmote(Emote.NEXT,"<:next:809233195136188467>") .setEmote(Emote.CANCEL, "<:cancel:809239881002909737>")

Expected behavior

the same behavior as with standard arrows

avurro commented 2 years ago

In Paginator class you use: private Map<Emote, Emoji> emotes = new EnumMap<>(Emote.class);

But in Pages class you use: com.github.ygimenez.type.EMOTE

If my analysis is correct it's sufficient to retrieve the emojis from Paginator.

ygimenez commented 2 years ago

What error do you get?

avurro commented 2 years ago

No errors. Nothing happens when you click the emojis.

ygimenez commented 2 years ago

Thanks, that helps a bit when debugging.

avurro commented 2 years ago

Not to put pressure on, but I need the library up and running in a short time. If you need a couple of days no problem, otherwise I use older versions (which unfortunately require code changes).

ygimenez commented 2 years ago

I'll not be able to work on it this weekend (not at home), but I'll fix it as soon as possible.

You could meanwhile use default emotes or see if the it works in the alternative mode (reactions or interactions, depending on what you're currently using) since it's designed to require minimum refactoring to switch between the two (just changing from Page to InteractPage and setting useButtons to true on the methods).

ygimenez commented 2 years ago

Issue fixed in release 3.0.7