Reactionmenu

Latest version: v3.1.7

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

Scan your dependencies

Page 2 of 5

3.1.1

<details>
<summary>Click to display changelog</summary>

Bug Fixes
* Fixed an issue where a `ViewMenu` would result in an exception/indefinite "thinking" state if the user already responded to the interaction ([38](https://github.com/Defxult/reactionmenu/pull/38))

Miscellaneous
* Added support for GitHub commit hash versioning. This will help determine exactly what commit version of the library the user is using.
</details>

3.1.0

<details>
<summary>Click to display changelog</summary>

Breaking Changes
* **This library is no longer dependent on Pycord. It has changed back to discord.py**
* Parameter `ctx` has been changed to `method` for `ReactionMenu` & `ViewMenu` constructor and is now positional only
* Parameter `menu_type` for `ReactionMenu` & `ViewMenu` constructor is now keyword only
* The auto-paginate feature for `ReactionMenu` has been removed
* The `Page` class has been added. Represents each "page" added via `.add_page()`/`.add_pages()`
* Using `.last_viewed` now returns a `Page`. `.pages` now returns a `List[Page]`
* Class methods `ViewButton.skip()` & `ReactionButton.skip()` has been renamed to `.generate_skip()` because of an earlier name conflict.
* The default behavior for the below methods have changed. Previously, using the below methods would return/stop menu's for both `ReactionMenu` & `ViewMenu`. With this update, each method by default now returns or stops menu's according to whichever class the method was invoked from. For example, `ViewMenu.stop_all_sessions()` only stops all `ViewMenu` sessions instead of all `ReactionMenu` sessions as well as `ViewMenu` sessions.
* `.get_all_dm_sessions()`
* `.get_all_sessions()`
* `.get_session(name: str)`
* `.stop_all_sessions()`
* `.stop_session(name: str, include_all=False)`
* `.get_sessions_count()`
* With this change, methods `.split_sessions()` & `.stop_only()` have been removed
* With the addition of selects in `ViewMenu`, method `.refresh_menu_buttons()` has been renamed to `.refresh_menu_items()`
* Parameters `remove_buttons` and `disable_buttons` have been removed from method `ViewMenu.stop()`. With the addition of selects, the following new parameters will now take their place
* `remove_items`
* `disable_items`
* The following attributes have been renamed in the `ViewMenu` class
* `disable_buttons_on_timeout` → `disable_items_on_timeout`
* `remove_buttons_on_timeout` → `remove_items_on_timeout`
* Method `.add_from_messages()` is no longer `async`
Bug Fixes
* Fixed an issue where `ViewButton` link buttons would be removed even after setting it as persistent
* Using the `reply` kwarg for `ReactionMenu` in a thread or voice channel now works as intended
New Features
ReactionMenu & ViewMenu
* Pagination is no longer limited to just embeds or text. The normal embed menu can now paginate with embeds, text, as well as files. With this, method `.add_page()` has two new parameters
* Old: `.add_page(embed)`
* New: `.add_page(embed=MISSING, content=None, files=MISSING)`
* Added class method `quick_start()`. Start a menu with it's default settings only adding the pages
* Added property `menu_type`. Displays the menu type that was set in the constructor
* Added property `rows`. Returns all the data that was added to the menu via `.add_row()`
* Added method `.randomize_embed_colors()`. Selects a random color for all embeds added to the menu
* Added method `.version_info()`. A simple shortcut to function `reactionmenu.version_info()`
* Added the ability to set the separator between the page director and embed footer text via the `separator` parameter
* `.set_page_director_style(..., separator=DEFAULT)`
* Added support for voice channels to be utilized via the `send_to` parameter in the `.start()` method.
ViewMenu Only
* Added the ability to use a select to go to a page instead of using text input
* Added the `persist` kwarg to `ViewButton`. This prevents link buttons from being disabled/removed when the menu times out or is stopped so they can remain clickable
* Added class `ViewSelect`. Used to choose categories in the menu. With the addition of selects, the following methods have been added
* `.add_select(select: ViewSelect)`
* `.remove_select(select: ViewSelect)`
* `.remove_all_selects()`
* `.disable_select(select: ViewSelect)`
* `.disable_all_selects()`
* `.enable_select(select: ViewSelect)`
* `.enable_all_selects()`
* `.get_select(title: Union[str, None])`
* `.set_select_option_relay(func: Callable[[NamedTuple], None], *, only: Optional[Sequence[str]]=None)`
* `.remove_select_option_relay()`
* Added property `.selects`. Returns all `ViewSelect` associated with the menu

Miscellaneous
* Added exception `SelectNotFound`
* The `Page` class has been added to `__init__` and is now available for use
* If the `method` parameter in either the `ReactionMenu` or `ViewMenu` constructor is of the wrong type, `IncorrectType` is now raised
</details>

3.0.2

<details>
<summary>Click to display changelog</summary>

New Features
ReactionMenu & ViewMenu
* Added class method `quick_start()`. Start a menu with it's default settings only adding the pages
* Added property `menu_type`. Displays the menu type that was set in the constructor
ViewMenu Only
* Added the `persist` kwarg to `ViewButton`. This prevents link buttons from being disabled/removed when the menu times out or is stopped so they can remain clickable

Changes
ReactionMenu & ViewMenu
* The default behavior for the below methods have changed. Previously, using the below methods would return/stop menu's for both `ReactionMenu` & `ViewMenu`. With this update, each method by default now returns or stops menu's according to whichever class the method was invoked from. For example, `ViewMenu.stop_all_sessions()` only stops all `ViewMenu` sessions instead of all `ReactionMenu` sessions and `ViewMenu` sessions. This is done with the addition of the `fixed` parameter for the following methods. If you like the old behavior, simply set the `fixed` parameter to `False`
* `.get_all_dm_sessions(fixed=True)`
* `.get_all_sessions(fixed=True)`
* `.get_session(name: str, fixed=True)`
* `.stop_all_sessions(fixed=True)`
* `.stop_session(name: str, include_all=False, fixed=True)`
* `.get_sessions_count(fixed=True)`

With this change, method `.stop_only()` is now deprecated
</details>

3.0.1

<details>
<summary>Click to display changelog</summary>

Bug Fixes
* Fixed an issue where exceptions were being suppressed if one was to occur during the pagination process (`ReactionMenu` only)

New Features
ReactionMenu & ViewMenu
* Added method `wait_until_close()`
</details>

3.0.0

<details>
<summary>Click to display changelog</summary>

Library Change
* With the discontinuation of discord.py, this library is now dependent on [pycord](https://github.com/Pycord-Development/pycord)

Breaking Changes
* *changed* `ReactionMenu.STATIC` and `ReactionMenu.DYNAMIC` have been renamed
* Old: `ReactionMenu.STATIC`
* New: `ReactionMenu.TypeEmbed`
* Old: `ReactionMenu.DYNAMIC`
* New: `ReactionMenu.TypeEmbedDynamic`
* *changed/removed* The parameters of `ReactionMenu` have been changed
* Old: `ReactionMenu(ctx, back_button='⬅️', next_button='➡️', config=ReactionMenu.STATIC)`
* New: `ReactionMenu(ctx, menu_type=ReactionMenu.TypeEmbed)`
* *changed/removed* `ReactionMenu` and `TextMenu` are no longer separate classes. `TextMenu` has been merged into `ReactionMenu`. You can use a text menu by doing the following
* `ReactionMenu(..., menu_type=ReactionMenu.TypeText)`
* *changed* The `Button` class has been renamed to `ReactionButton` to avoid compatibility issues with pycord 2.0
* *changed* `ButtonType` has been moved and setting the `linked_to` of a button is now set through the button itself
* Old: `Button(..., linked_to=ButtonType.NEXT_PAGE)`
* New: `ReactionButton(..., linked_to=ReactionButton.Type.NEXT_PAGE)`
* *changed* Method `ButtonType.caller_details()` has been renamed and moved to `ReactionButton`
* Old: `Button(..., details=ButtonType.caller_details())`
* New: `ReactionButton(..., details=ReactionButton.set_caller_details())`
* *removed* `ReactionMenu` parameters `back_button` and `next_button` have been removed. Use `ReactionMenu.add_button()` instead
* *removed* `ReactionMenu` parameter `config` has been removed/replaced with parameter `menu_type`
* *removed* Attribute `ReactionMenu.run_time`
* *removed* Attribute `ReactionMenu.default_next_button`
* *removed* Attribute `ReactionMenu.default_back_button`
* *removed* Attribute `ReactionMenu.all_buttons`. Use `ReactionMenu.buttons` instead
* *removed* Attribute `ReactionMenu.next_buttons`
* *removed* Attribute `ReactionMenu.back_buttons`
* *removed* Attribute `ReactionMenu.first_page_buttons`
* *removed* Attribute `ReactionMenu.last_page_buttons`
* *removed* Attribute `ReactionMenu.caller_buttons`
* *removed* Attribute `ReactionMenu.end_session_buttons`
* *removed* Attribute `ReactionMenu.go_to_page_buttons`
* *removed* `ReactionMenu.help_appear_order()`
* *removed* `ReactionMenu.change_appear_order()`
* *removed* Exception `SingleUseOnly`
* *changed* `ReactionMenu.clear_all_buttons()` to `ReactionMenu.remove_all_buttons()`
* *changed* `ReactionMenu.all_can_react` is now `ReactionMenu.all_can_click`
* *changed* Parameter `turn_every` in methods `ReactionMenu.set_as_auto_paginator()` and `ReactionMenu.update_turn_every()` are now keyword only arguments
* *changed* A lot of `ReactionMenu` attributes are no longer property getters/setters. They are now normal attributes with type hints
* *changed* The parameter for method `.get_menu_from_message()` is now positional only
* *changed* The following items now return only a `list` instead of `list` or `None` (if no sessions/buttons were found). If no sessions/buttons were found, an empty list is returned
* `.get_all_dm_sessions()`
* `.get_all_sessions()`
* `.get_session()`
* `.buttons_most_clicked`
* `.buttons`

Discords Buttons feature has been implemented using pycord. Two classes have been renamed/removed to support `discord.ui.View`
* *removed* `ButtonsMenu` class
* This has been replaced with `ViewMenu`
* *changed* The `ViewMenu.update()` method arguments are now keyword only
* *removed* `ComponentsButton` class
* This has been replaced with `ViewButton`
* *changed* All `ComponentsButton` factory methods. They've been renamed and are now apart of the `ViewButton` class
* Old
* `ComponentsButton.basic_back()`
* `ComponentsButton.basic_next()`
* New
* `ViewButton.back()`
* `ViewButton.next()`
* *changed* The emojis attached to each menu have been moved to their own class
* Old
* `ReactionMenu.EMOJI_BACK_BUTTON`
* `ReactionMenu.EMOJI_NEXT_BUTTON`
* New
* `ReactionMenu.Emojis.BACK_BUTTON`
* `ReactionMenu.Emojis.NEXT_BUTTON`
* *changed* `ReactionButton` names are now case sensitive if you were to `get` a button
* *changed* Getting a button with `ReactionMenu` has been replaced by a new method
* Old: `ReactionMenu.get_button_by_name(name: str)`
* New: `ReactionMenu.get_button(identity: Union[str, int], *, search_by='name')`. This method now returns only a `list` of buttons instead of either a single button or multiple buttons
* *changed* Setting the `ID_CALLER` information is different now. See the documentation for proper implementation

New Features
ReactionMenu & ViewMenu
* Added the ability to paginate through multiple pages in a single button press
* `ReactionButton(..., skip=ReactionButton.Skip(...))`
* Added the ability for relay functions to relay only the buttons of your choice instead of relaying all buttons
* `ReactionMenu.set_relay(..., only: List[ReactionButton]=None)`
* Added the ability to remove the call to a timeout method if you have one set
* `ReactionMenu.remove_on_timeout()`
* Added the ability to add multiple pages/buttons to the menu at once
* `ReactionMenu.add_pages(pages: Sequence[Union[discord.Embed, str]])`
* `ReactionMenu.add_buttons(buttons: Sequence[ReactionButton])`
* Added parameter `reply` to the `start` method. Enables the menu message to reply to the message that triggered it
* `ReactionMenu.start(..., reply: bool=False)`
* Added property `ReactionMenu.last_viewed`. Returns the last page that was seen by the user in the pagination process
* Added the ability to use a message ID/message object to add the specified message's content into a menu
* `ReactionMenu.add_from_ids(messageable: discord.abc.Messageable, message_ids: Sequence[int])`
* `ReactionMenu.add_from_messages(messages: Sequence[discord.Message])`
* Added the ability to separate embeds and strings
* `Reactionmenu.separate(values: Sequence[Any])`
* Added the ability to test whether all items in a sequence are of type `discord.Embed` or `str`
* `ReactionMenu.all_embeds(values: Sequence[Any])`
* `ReactionMenu.all_strings(values: Sequence[Any])`
* Added the ability to filter all active `ReactionMenu`'s and `ViewMenu`'s into two separate lists
* `ReactionMenu.split_sessions()`
* Added the ability to stop all `ReactionMenu`'s or `ViewMenu`'s
* `ReactionMenu.stop_only(session_type: str)`
* Added a method that allows you to set the page director style from a set of pre-defined styles
* `ReactionMenu.set_page_director_style(style_id: int)`

ReactionMenu Only
* Added factory methods for `ReactionButton`
* `ReactionButton.back()`
* `ReactionButton.next()`
* `ReactionButton.go_to_first_page()`
* `ReactionButton.go_to_last_page()`
* `ReactionButton.go_to_page()`
* `ReactionButton.end_session()`
* `ReactionButton.all()`
* `ReactionButton.skip(emoji: str, action: str, amount: int)`
* Added attribute `ReactionMenu.remove_extra_emojis`

ViewMenu Only
* Added factory methods for `ViewButton`
* `ViewButton.link(label: str, url: str)`
* `ViewButton.skip(label: str, action: str, amount: int)`
* Added methods to set all button styles
* `ViewMenu.randomize_button_styles()`
* `ViewMenu.set_button_styles(style: discord.ButtonStyle)`
* `ViewButton` now has a `name` attribute
* Added the ability for method `ViewMenu.get_button()` to get buttons by name
* `ViewMenu.get_button(..., search_by='name')`

Miscellaneous
* `ReactionButton` & `ViewButton` attribute `last_clicked` now supports an aware `datetime.datetime`
* The `send_to` parameter in method `.start()` now supports threads
* Method `.set_on_timeout()` now raises `IncorrectType` instead of `MenuException` if the parameter given was not callable
* Method `ReactionMenu.add_button()` now also raises `MenuSettingsMismatch`
* Method `ReactionMenu.refresh_auto_pagination_data()` now raises an error if no data was given in it's parameter
* Added new exceptions. `ViewMenuException` and `MenuException`. All library exceptions can be caught using `MenuException`
* Added function `reactionmenu.version_info()`. Used if submitting a GitHub issue
* Added dunder methods for the library itself and a class
* `__all__` for `reactionmenu` (`from reactionmenu import *`)
* `__repr__` for `ViewButton.Followup`

</details>


Note
For `v1.0.9 - v2.0.4`, the following displays what each acronym represents
* `BM` = `ButtonsMenu`
* `RM` = `ReactionMenu`
* `TM` = `TextMenu`

2.0.4

<details>
<summary>Click to display changelog</summary>

Bug Fixes
* `BM` Fixed an issue where multiple link buttons couldn't be used

</details>

Page 2 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.