diff --git a/redbot/core/commands/help.py b/redbot/core/commands/help.py index eb6fbf49e..bff76c292 100644 --- a/redbot/core/commands/help.py +++ b/redbot/core/commands/help.py @@ -26,6 +26,7 @@ # Additionally, this gives our users a bit more customization options including by # 3rd party cogs down the road. +import asyncio from collections import namedtuple from typing import Union, List, AsyncIterator, Iterable, cast @@ -555,10 +556,13 @@ class RedHelpFormatter: ) ) else: - if len(pages) > 1: - await menus.menu(ctx, pages, menus.DEFAULT_CONTROLS) - else: - await menus.menu(ctx, pages, {"\N{CROSS MARK}": menus.close_menu}) + # Specifically ensuring the menu's message is sent prior to returning + m = await (ctx.send(embed=pages[0]) if embed else ctx.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. + asyncio.create_task(menus.menu(ctx, pages, c, message=m)) + # menu needs reactions added manually since we fed it a messsage + menus.start_adding_reactions(m, c.keys()) @commands.command(name="help", hidden=True, i18n=T_)