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

Paginator reacts to every button even if it is already acknowleged #37

Closed
5 tasks done
Miha23833 opened this issue Jan 19, 2022 · 2 comments
Closed
5 tasks done
Labels
bug Something isn't working

Comments

@Miha23833
Copy link

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 4.4.0_350
  • PaginationUtils version 3.0.4

Describe the bug

When I update a self-written button that is not related to Paginator, I catch an exception from Paginator (attached). I think MessageHandler handles every buttonClick event even if it is acknowleged.

To Reproduce

Steps to reproduce the behavior:

  1. Handle onButtonClick event in self-written ListenerAdapter;
  2. Do anything with it to set Interatction of this event to acknowleged;
  3. MessageHandler sends an exception because the message is already acknowleged

Expected behavior

MessageHandler should handle only its own onButtonClick events.

Additional context

I believe you can differ buttons using customId and handle only yours.

stacktrace.txt

@ygimenez
Copy link
Owner

ygimenez commented Jan 20, 2022

I see, I'll add some kind of tag to prevent interference with external events. Thanks for noticing that.

@ygimenez
Copy link
Owner

Issue fixed in release 3.0.6

@ygimenez ygimenez added the bug Something isn't working label Jan 20, 2022
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