mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-06 09:22:31 -05:00
Add user param to menu() (#4913)
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> Co-authored-by: Jakub Kuczys <me@jacken.men>
This commit is contained in:
committed by
GitHub
parent
4c7a691ec9
commit
8c2976504a
@@ -878,14 +878,10 @@ class RedHelpFormatter(HelpFormatterABC):
|
||||
m = await (destination.send(embed=pages[0]) if embed else destination.send(pages[0]))
|
||||
c = menus.DEFAULT_CONTROLS if len(pages) > 1 else {"\N{CROSS MARK}": menus.close_menu}
|
||||
# Allow other things to happen during menu timeout/interaction.
|
||||
if use_DMs:
|
||||
menu_ctx = await ctx.bot.get_context(m)
|
||||
# Monkeypatch so help listens for reactions from the original author, not the bot
|
||||
menu_ctx.author = ctx.author
|
||||
else:
|
||||
menu_ctx = ctx
|
||||
asyncio.create_task(
|
||||
menus.menu(menu_ctx, pages, c, message=m, timeout=help_settings.react_timeout)
|
||||
menus.menu(
|
||||
ctx, pages, c, user=ctx.author, message=m, timeout=help_settings.react_timeout
|
||||
)
|
||||
)
|
||||
# menu needs reactions added manually since we fed it a message
|
||||
menus.start_adding_reactions(m, c.keys())
|
||||
|
||||
Reference in New Issue
Block a user