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

[Suggestion] Include support for Discord's buttons for pagination #2

Closed
4 of 6 tasks
Andre601 opened this issue Jun 3, 2021 · 3 comments · Fixed by #50 · May be fixed by #32
Closed
4 of 6 tasks

[Suggestion] Include support for Discord's buttons for pagination #2

Andre601 opened this issue Jun 3, 2021 · 3 comments · Fixed by #50 · May be fixed by #32
Labels
enhancement New feature or request module: menu Menu module

Comments

@Andre601
Copy link

Andre601 commented Jun 3, 2021

Issue

Issue Checklist

Please follow the following steps before opening this issue.

Issues that do not complete the checklist may be closed without any help.

  • I have checked for similar issues on the issue tracker.
  • I have updated to the latest version of JDA-Utilities.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

Issue Information

Check all that apply:

  • This is a bug report about an error, issue, or bug in JDA-Utilities.
    • I have been able to consistently reproduce this bug.
  • This is a feature request for the JDA-Utilities library.

Description

It would be a real nice addition to have direct support for Discord's buttons in the navigation of Pagination.

Current downsides I can see are as follows:

  • Would (currently) use the feature/slash-command branch of JDA since Button support isn't officially released into JDA yet.
  • Button handling could become more difficult in terms of resolving message and current state (what "page" is displayed) but I assume this is similar complication/effort as the reaction-system and could perhaps be simplified/combined into a single manager to handle it.
  • The code in general is a big pile of 💩... I know it, since I tried myself to implement button support.
@Chew Chew added the enhancement New feature or request label Jun 4, 2021
@Chew
Copy link
Owner

Chew commented Jun 4, 2021

Unironically may just be the best maneuver to deprecate all the classes and make our own 😂 I never realized how many paginators there were and it's kinda annoying. They could easily be merged

@Andre601
Copy link
Author

Andre601 commented Jun 4, 2021

Unironically may just be the best maneuver to deprecate all the classes and make our own 😂 I never realized how many paginators there were and it's kinda annoying. They could easily be merged

Agree.
A central PaginatorUtil (or something like that) which handles reaction/button clicking and perhaps even pagination creation (Considering that all menus/paginators so far use embeds) itself would allow to reduce a lot of duplicate code and make stuff less bloated.

@Andre601
Copy link
Author

Andre601 commented Jun 8, 2021

One current problem I see right now is, that the Utils uses a RestAction<Message> to directly get the Message info from a sendMessage or editMessage Action. This allows it to have checks like the message ID and such in its waitForEvent.
With buttons would we - at least for sendMessage - require a way to get the ID and implement it into the buttons, or find a more generic button ID setup and some logic behind it....

@Chew Chew linked a pull request Oct 4, 2021 that will close this issue
4 tasks
@Chew Chew linked a pull request Nov 22, 2021 that will close this issue
12 tasks
@Chew Chew added the module: menu Menu module label Feb 2, 2022
@Chew Chew closed this as completed in #50 Mar 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module: menu Menu module
Projects
None yet
2 participants