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

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

Closed Miha23833 closed 2 years ago

Miha23833 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

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 commented 2 years ago

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

ygimenez commented 2 years ago

Issue fixed in release 3.0.6