Releases: Defxult/reactionmenu
Releases · Defxult/reactionmenu
v3.1.7
v3.1.6
v3.1.5
v3.1.4
v3.1.3
v3.1.2
v3.1.1
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)
Miscellaneous
- Added support for GitHub commit hash versioning. This will help determine exactly what commit version of the library the user is using.
v3.1.0
Breaking Changes
- This library is no longer dependent on Pycord. It has changed back to discord.py
- Parameter
ctx
has been changed tomethod
forReactionMenu
&ViewMenu
constructor and is now positional only - Parameter
menu_type
forReactionMenu
&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 aPage
..pages
now returns aList[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 allViewMenu
sessions instead of allReactionMenu
sessions as well asViewMenu
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
anddisable_buttons
have been removed from methodViewMenu.stop()
. With the addition of selects, the following new parameters will now take their placeremove_items
disable_items
- The following attributes have been renamed in the
ViewMenu
classdisable_buttons_on_timeout
→disable_items_on_timeout
remove_buttons_on_timeout
→remove_items_on_timeout
- Method
.add_from_messages()
is no longerasync
Bug Fixes
- Fixed an issue where
ViewButton
link buttons would be removed even after setting it as persistent - Using the
reply
kwarg forReactionMenu
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)
- Old:
- 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 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 toViewButton
. 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 allViewSelect
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 theReactionMenu
orViewMenu
constructor is of the wrong type,IncorrectType
is now raised
v3.0.2
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 toViewButton
. 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 allViewMenu
sessions instead of allReactionMenu
sessions andViewMenu
sessions. This is done with the addition of thefixed
parameter for the following methods. If you like the old behavior, simply set thefixed
parameter toFalse
.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