# Buggy code
async def format_command_help(self, ctx: Context, obj: commands.Command):
    send = await ctx.bot._config.help.verify_exists()
    if not send:
        async for _ in self.help_filter_func(ctx, (obj,), bypass_hidden=True):
            # This is a really lazy option for not
            # creating a separate single case version.
            # It is efficient though
            #
            # We do still want to bypass the hidden requirement on
            # a specific command explicitly invoked here.
            send = True

    if not send:
        return

    command = obj

    description = command.description or ""
    tagline = (await ctx.bot._config.help.tagline()) or self.get_default_tagline(ctx)
    signature = (
        f"`Syntax: {ctx.clean_prefix}{command.qualified_name} {command.signature}`"
    )
    subcommands = None

    if hasattr(command, "all_commands"):
        grp = cast(commands.Group, command)
        subcommands = await self.get_group_help_mapping(ctx, grp)

    if await ctx.embed_requested():
        emb = {
            "embed": {"title": "", "description": ""},
            "footer": {"text": ""},
            "fields": [],
        }

        if description:
            emb["embed"]["title"] = f"*{description[:2044]}*"

        emb["footer"]["text"] = tagline
        emb["embed"]["description"] = signature

        if command.help:
            splitted = command.help.split("\n\n")
            name = splitted[0]
            value = "\n\n".join(splitted[1:]).replace("[p]", ctx.clean_prefix)
            if not value:
                value = EMPTY_STRING
            field = EmbedField(name[:252], value[:1024], False)
            emb["fields"].append(field)

        if subcommands:

            def shorten_line(a_line: str) -> str:
                if len(a_line) < 70:  # embed max width needs to be lower
                    return a_line
                return a_line[:67] + "..."

            subtext = "\n".join(
                shorten_line(f"**{name}** {command.short_doc}")
                for name, command in sorted(subcommands.items())
            )
            for i, page in enumerate(pagify(subtext, page_length=1000, shorten_by=0)):
                if i == 0:
                    title = "**__Subcommands:__**"
                else:
                    title = "**__Subcommands:__** (continued)"
                field = EmbedField(title, page, False)
                emb["fields"].append(field)

        await self.make_and_send_embeds(ctx, emb)

    else:  # Code blocks:
        subtext = None
        subtext_header = None
        if subcommands:
            subtext_header = "Subcommands:"
            max_width = max(
                discord.utils._string_width(name) for name in subcommands.keys()
            )

            def width_maker(cmds):
                doc_max_width = 80 - max_width
                for nm, com in sorted(cmds):
                    width_gap = discord.utils._string_width(nm) - len(nm)
                    doc = com.short_doc
                    if len(doc) > doc_max_width:
                        doc = doc[: doc_max_width - 3] + "..."
                    yield nm, doc, max_width - width_gap

            subtext = "\n".join(
                f"  {name:<{width}} {doc}"
                for name, doc, width in width_maker(subcommands.items())
            )

        to_page = "\n\n".join(
            filter(
                None,
                (
                    description,
                    signature[1:-1],
                    command.help.replace("[p]", ctx.clean_prefix),
                    subtext_header,
                    subtext,
                ),
            )
        )
        pages = [box(p) for p in pagify(to_page)]
        await self.send_pages(ctx, pages, embed=False)


# Traceback (discord.ext.commands.errors.CommandInvokeError)
Exception in command 'help'
Traceback (most recent call last):
File "c:\envs\sass2\lib\site-packages\discord\ext\commands\core.py", line 79, in wrapped
ret = await coro(*args, **kwargs)
File "c:\envs\sass2\lib\site-packages\redbot\core\commands\help.py", line 664, in red_help
await ctx.bot.send_help_for(ctx, thing_to_get_help_for)
File "c:\envs\sass2\lib\site-packages\redbot\core\bot.py", line 530, in send_help_for
return await self._help_formatter.send_help(ctx, help_for)
File "c:\envs\sass2\lib\site-packages\redbot\core\commands\help.py", line 126, in send_help
await self.format_bot_help(ctx)
File "c:\envs\sass2\lib\site-packages\redbot\core\commands\help.py", line 469, in format_bot_help
await self.make_and_send_embeds(ctx, emb)
File "c:\envs\sass2\lib\site-packages\redbot\core\commands\help.py", line 361, in make_and_send_embeds
await self.send_pages(ctx, pages, embed=True)
File "c:\envs\sass2\lib\site-packages\redbot\core\commands\help.py", line 627, in send_pages
await destination.send(embed=page)
File "c:\envs\sass2\lib\site-packages\redbot\core\commands\context.py", line 82, in send
return await super().send(content=content, **kwargs)
File "c:\envs\sass2\lib\site-packages\discord\abc.py", line 823, in send
data = await state.http.send_message(channel.id, content, tts=tts, embed=embed, nonce=nonce)
File "c:\envs\sass2\lib\site-packages\discord\http.py", line 222, in request
raise HTTPException(r, data)
discord.errors.HTTPException: 400 BAD REQUEST (error code: 50035): Invalid Form Body
In embed: Embed size exceeds maximum size of 6000

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "c:\envs\sass2\lib\site-packages\discord\ext\commands\bot.py", line 863, in invoke
await ctx.command.invoke(ctx)
File "c:\envs\sass2\lib\site-packages\discord\ext\commands\core.py", line 728, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "c:\envs\sass2\lib\site-packages\discord\ext\commands\core.py", line 88, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: HTTPException: 400 BAD REQUEST (error code: 50035): Invalid Form Body
In embed: Embed size exceeds maximum size of 6000

# Fixed code
async def format_command_help(self, ctx: Context, obj: commands.Command):
    send = await ctx.bot._config.help.verify_exists()
    if not send:
        async for _ in self.help_filter_func(ctx, (obj,), bypass_hidden=True):
            # This is a really lazy option for not
            # creating a separate single case version.
            # It is efficient though
            #
            # We do still want to bypass the hidden requirement on
            # a specific command explicitly invoked here.
            send = True

    if not send:
        return

    command = obj

    description = command.description or ""
    tagline = (await ctx.bot._config.help.tagline()) or self.get_default_tagline(ctx)
    signature = (
        f"`Syntax: {ctx.clean_prefix}{command.qualified_name} {command.signature}`"
    )
    subcommands = None

    if hasattr(command, "all_commands"):
        grp = cast(commands.Group, command)
        subcommands = await self.get_group_help_mapping(ctx, grp)

    if await ctx.embed_requested():
        emb = {
            "embed": {"title": "", "description": ""},
            "footer": {"text": ""},
            "fields": [],
        }

        if description:
            emb["embed"]["title"] = f"*{description[:2044]}*"

        emb["footer"]["text"] = tagline
        emb["embed"]["description"] = signature

        if command.help:
            splitted = command.help.split("\n\n")
            name = splitted[0]
            value = "\n\n".join(splitted[1:]).replace("[p]", ctx.clean_prefix)
            if not value:
                value = EMPTY_STRING
            field = EmbedField(name[:252], value[:1024], False)
            emb["fields"].append(field)

        if subcommands:

            def shorten_line(a_line: str) -> str:
                if len(a_line) < 70:  # embed max width needs to be lower
                    return a_line
                return a_line[:67] + "..."

            subtext = "\n".join(
                shorten_line(f"**{name}** {command.short_doc}")
                for name, command in sorted(subcommands.items())
            )
            for i, page in enumerate(pagify(subtext, page_length=500, shorten_by=0)):
                if i == 0:
                    title = "**__Subcommands:__**"
                else:
                    title = "**__Subcommands:__** (continued)"
                field = EmbedField(title, page, False)
                emb["fields"].append(field)

        await self.make_and_send_embeds(ctx, emb)

    else:  # Code blocks:
        subtext = None
        subtext_header = None
        if subcommands:
            subtext_header = "Subcommands:"
            max_width = max(
                discord.utils._string_width(name) for name in subcommands.keys()
            )

            def width_maker(cmds):
                doc_max_width = 80 - max_width
                for nm, com in sorted(cmds):
                    width_gap = discord.utils._string_width(nm) - len(nm)
                    doc = com.short_doc
                    if len(doc) > doc_max_width:
                        doc = doc[: doc_max_width - 3] + "..."
                    yield nm, doc, max_width - width_gap

            subtext = "\n".join(
                f"  {name:<{width}} {doc}"
                for name, doc, width in width_maker(subcommands.items())
            )

        to_page = "\n\n".join(
            filter(
                None,
                (
                    description,
                    signature[1:-1],
                    command.help.replace("[p]", ctx.clean_prefix),
                    subtext_header,
                    subtext,
                ),
            )
        )
        pages = [box(p) for p in pagify(to_page)]
        await self.send_pages(ctx, pages, embed=False)