Skip to content

Commit

Permalink
Add usage to existing code
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackenmen committed Mar 17, 2024
1 parent a6410dc commit 2cf8a22
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions redbot/core/commands/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,14 +878,10 @@ async def send_pages(
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())
Expand Down

0 comments on commit 2cf8a22

Please sign in to comment.