Repository: Cog-Creators/Red-DiscordBot

Issue:
[HelpFormatter] menus blocking settings preview
# Other bugs

#### What were you trying to do?

View current `[p]set` settings

#### What were you expecting to happen?

`[p]set` shows help for `[p]set` and current bot's settings

#### What actually happened?

`[p]set` shows only help for ~15 seconds or until helpmenu is closed manually, then shows current settings

#### How can we reproduce this issue?

1. Enable `[p]helpset usemenus`
2. Use `[p]set` cmd or `[p]modset`

![gif](https://Moeka.is-a-good-waifu.com/8Uj5YPf.gif)



Discussion:
The reason this happens is pretty obvious...

I see a few options here.

1. Don't change the help behavior further, just send the settings first.
    - This has a downside that people need to consistently do this.
    - It's a change in output formatting from what people are used to
2. Detatch the menu into a task in the help formatter itself.
    - We could in theory end up with different ordering each time.
        - Could probably circumvent the above by detatching and sleeping a 10th of a second, but this isn't great.
        - EDIT: a better solution (here) would be manually send the first page, then use the menu in a task.
    - This changes the API of the help formatter again, as currently it wont return until finished.
        - EDIT: I'm okay with this change, given the return type is always None, and can still be assumed to mean "help has been sent" 
    - (EDIT:) This is my current preference
3. Detatch the menu into a task in the few groups which use it this way
    - This is my personal pick (Edit: Was)
    - The "having to do it yourself" part is already implied by using `autohelp=False` for these.
    - Does add some extra work for 3rd party devs emulating the design. 
        - This would mean we have a how to reference in core code though
4. Stop sending the settings when used like this and add view commands for settings.
    - Clear behavior without design concerns
    - Does add another command

Resolving patch:
diff --git a/redbot/core/commands/help.py b/redbot/core/commands/help.py
--- 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
 
@@ -549,10 +550,13 @@ async def send_pages(
                             )
                         )
         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_)


Test patch: