Previously, ButtonMenuPages updates the menu message two times (one to update the content/embed and another to update the view). This PR consolidates the two edits into a single request for efficiency.
The view kwarg was added to an override of _get_kwargs_from_page so that ButtonMenuPages will always make sure the view is updated when editing the menu and there is no need to update the view at the end of the button callback.
Note:
The call to _disable_unavailable_buttons() now happens in show_page() instead of the Button callback.
_get_kwargs_from_page() for ButtonMenuPages will always include view as a key.
Fixes #18
Previously,
ButtonMenuPages
updates the menu message two times (one to update the content/embed and another to update the view). This PR consolidates the two edits into a single request for efficiency.The
view
kwarg was added to an override of_get_kwargs_from_page
so thatButtonMenuPages
will always make sure the view is updated when editing the menu and there is no need to update the view at the end of the button callback.Note:
_disable_unavailable_buttons()
now happens inshow_page()
instead of the Button callback._get_kwargs_from_page()
for ButtonMenuPages will always includeview
as a key.