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

Issue with newer Versions of JDA #46

Closed StateofDisarray closed 1 year ago

StateofDisarray commented 2 years ago

Due to several classes in JDA being moved around, implementations/class hierarchy changed and/or interactions having been rewritten in the newer versions of the JDA, the pagination util does not fully work for the newest version.

I wanted to open this issue merely to point them out in case you wanted to fix them on your end. When the relevant adjusments are made, the library works perfectly.

1) Component has been changed to ItemComponent. This causes an issue in that the ActionRow.of() method supports collections of ItemComponent. This can be fixed by changing the type of the row lists under the pagination class, such as line 1610

2) Buttons (and ButtonInteraction classes )have been moved in the JDA under a category of their own, from "".components.Button to "".components.buttons.Button and "".components.buttons.ButtonInteraction

3) OnButtonClick events have been renamed to ButtonInteractionEvent. However its methods are the same, so changing imports and fixing types also solves this issue

I'm not sure if this library is still supported, but if it is, doing these changes might be helpful for newcomers. Very helpful library in any case!

-Dennis

ygimenez commented 2 years ago

I'm not sure if this library is still supported

Oh it is, but I cant release a major update before JDA's stable release, much can change during alpha phase.

Thanks for pointing the changes.

ygimenez commented 1 year ago

Issue fixed in release 4.0.1, thanks @BlitzOffline and @SIMULATAN for maintaining it while JDA was in alpha stage.