Skip to content

Commit

Permalink
Define view once inside menus.menu for button menus (#6472)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpopdev authored Nov 17, 2024
1 parent 30058c0 commit 2871992
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions redbot/core/utils/menus.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,12 @@ async def control_no(*args, **kwargs):
# where the original message is already sent prior to starting.
# This is not normally the way we recommend sending this because
# internally we already include the emojis we expect.
view = SimpleMenu(pages, timeout=timeout)
if controls == DEFAULT_CONTROLS:
view = SimpleMenu(pages, timeout=timeout)
await view.start(ctx, user=user)
await view.wait()
return
else:
view = SimpleMenu(pages, timeout=timeout)
view.remove_item(view.last_button)
view.remove_item(view.first_button)
has_next = False
Expand Down

0 comments on commit 2871992

Please sign in to comment.