mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
Pass timeout to SimpleMenu (#6173)
This commit is contained in:
parent
b1c3b37235
commit
41204ccf77
@ -110,6 +110,7 @@ async def menu(
|
||||
view._source = _SimplePageSource(pages)
|
||||
new_page = await view.get_page(page)
|
||||
view.current_page = page
|
||||
view.timeout = timeout
|
||||
await view.message.edit(**new_page)
|
||||
return
|
||||
if not isinstance(pages[0], (discord.Embed, str)):
|
||||
@ -137,12 +138,12 @@ async def menu(
|
||||
# This is not normally the way we recommend sending this because
|
||||
# internally we already include the emojis we expect.
|
||||
if controls == DEFAULT_CONTROLS:
|
||||
view = SimpleMenu(pages)
|
||||
view = SimpleMenu(pages, timeout=timeout)
|
||||
await view.start(ctx)
|
||||
await view.wait()
|
||||
return
|
||||
else:
|
||||
view = SimpleMenu(pages)
|
||||
view = SimpleMenu(pages, timeout=timeout)
|
||||
view.remove_item(view.last_button)
|
||||
view.remove_item(view.first_button)
|
||||
has_next = False
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user