Dpymenus

Latest version: v2.1.5

Safety actively analyzes 627182 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

2.0.0

Not secure
Highlight Features

- **Templates**: you can now apply styles across entire menus by using the new
**[templating system](https://dpymenus.com/templates.html)**
- **Hooks**: various menu events can now be **[hooked](https://dpymenus.com/hooks.html)** into with your own functions
- **Settings**: almost all settings are now configurable via a
**[configuration file](https://dpymenus.com/global_configuration.html)**
- **Documentation**: the **[API docs](https://dpymenus.readthedocs.io/en/latest/)** have been reworked, a
**[book](https://dpymenus.com/)** has been added with lots of detailed information, and
several **[new examples](https://github.com/robertwayne/dpymenus/tree/master/examples)** were added
*(additionally, all old examples were updated)*.

Added

- Session handling has been completely rewritten. This technically will not be fully functional until v2.1, but from an
external view, it will work the exact same *(without some of the common annoyances from before)*.
- The new Discord `reply` feature is now supported by menus. This can be configured via settings.
- Menus now support setting an initial page with a new method: `.set_initial_page()`.
- Examples can now be run with a built-in bot.

Changed

- Buttons are now throttled by default to avoid filling up rate limit buckets too quickly. This was a source of much
confusion. This can be configured via settings.
- Destination errors now fail gracefully.
- Fixed many bugs and optimized various logic paths.

Removed

- `.allow_multisession()` no longer exists. This is the default now *(as per popular request)*, and can be configured
via settings.
- Support for Python 3.7

Internal

- Poetry is now the package and build tool.
- Black is now the formatter.
- Almost all the internal code was rewritten resulting in better performance and/or cleaner code. Note that this could
mean your menus will break, if you were using any internally marked methods *(prefixed with an underscore)*.

1.3.1

Not secure
Changed

- Fixed a bug where ButtonMenu did not have the timeout set. (33)
- Fixed a bug with Poll callback validation.
- Refactored PaginatedMenus to now use the same timeout & close handling that all menu types do.

1.3.0

Not secure
Changed

- Menus now only require a single page to successfully build. *The original reasoning behind having this restriction was
based on the fact that a menu is generally going to consist of many pages. However, there have bene several use-cases
such as reloadable pages and dynamically generated menus, that may result in just a single page.*
- Fixed `reloadable_data_example.py` having a missing import.
- Updated `reloadable_data_example.py` to reflect the page validation change and remove the workaround requiring an
empty blank page.
- Updated dependency on `discord.py` to `1.6`.

1.2.3

Not secure
Added

- New example showing how to reload data without executing a page transition.

Changed

- Fixed a bug where PaginatedMenu & ButtonMenu types were not having their output set correctly when
using `set_destination`. This would raise a NotFound error in DM channels. (27)
- Fixed a bug where the reaction check predicates were incorrectly assuming Member-type instead of User-type. This would
cause raw reaction events to not be read in DM channels. (27)
- ButtonMenu types now clean up their output on page transition in DMs.

1.2.2

Not secure
Added

- Menus now expose a history attribute, an ordered list of user-visited pages. This lasts until the menu is closed.
- Added new helper method `.last_visited_page()` -- returns the last page index that a user had visited.

Changed

- ButtonMenu buttons will no longer refresh if the pages' index has not changed. This helps curb rate limiting, as well
as provides a cleaner end-user experience.
- Updated the API docs to include Page properties and methods.
- Refactored internal `next` events to remove repeated code.
- Removed redundant internal checks.

1.2.1

Not secure
Changed

- Fixed a bug where button indexes would become offset based on method call order.
- Fixed a bug where page numbers would not be shown based on method call order.
- Fixed a typo in the poll_example.py file so it now works correctly again.
- Clarified when the `next` event was emit in the README.

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.