robertwayne / dpymenus

Simplified menus for discord.py developers.
https://dpymenus.com/
MIT License
26 stars 4 forks source link

[Feature] Add PaginatedMenu type. #7

Closed robertwayne closed 4 years ago

robertwayne commented 4 years ago

A PaginatedMenu would differ from a ButtonMenu in that it would take various Pages without callbacks. Ideally we could pass in a list of Embeds, have it internally converted to Pages, and generate the buttons from generic buttons, similar to our current text-based constants.

PaginatedMenus would just display BACK, FORWARD, SEARCH, CANCEL buttons by default. They could be overridden with custom buttons.

Internally, the PaginatedMenu can just handle the button actions.

A PaginatedMenu would remove the need to add in callbacks for simpler button-based menus like help menus.

robertwayne commented 4 years ago

Mostly added as of 005dabd commit and PyPi release v0.3.0. Some functionality is missing, like options other than BACK, CANCEL, FORWARD and overriding the default buttons with custom buttons. I will look at adding those in a future update.