Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom reactions don't work #40

Closed
5 tasks done
avurro opened this issue Feb 25, 2022 · 7 comments
Closed
5 tasks done

custom reactions don't work #40

avurro opened this issue Feb 25, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@avurro
Copy link

avurro commented Feb 25, 2022

Checklist

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

  • Bot has the following permissions:
    • MESSAGE_ADD_REACTION
    • MESSAGE_EXT_EMOJI
    • MESSAGE_READ/WRITE
    • VIEW_CHANNEL
  • If using JDABuilder.createLight(), you added the following gateway intents:
    • GUILD_MESSAGES
    • GUILD_MESSAGE_REACTIONS
  • If using .setRemoveOnReact(true), you have the following permission:
    • MESSAGE_MANAGE
  • PaginationUtils is up-to-date.
  • You have activated the library as descripted in the README.

Library info

What libraries versions are you using.

  • JDA version X.XXX
  • PaginationUtils version X.XXX

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
Copy link
Author

avurro commented Feb 25, 2022

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
Copy link
Owner

What error do you get?

@ygimenez ygimenez added the bug Something isn't working label Feb 25, 2022
@avurro
Copy link
Author

avurro commented Feb 25, 2022

No errors. Nothing happens when you click the emojis.

@ygimenez
Copy link
Owner

Thanks, that helps a bit when debugging.

@avurro
Copy link
Author

avurro commented Feb 26, 2022

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
Copy link
Owner

ygimenez commented Feb 26, 2022

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
Copy link
Owner

Issue fixed in release 3.0.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants