From ee91c07062f5b288176f3bf6d04795d910a38d99 Mon Sep 17 00:00:00 2001 From: Paillat Date: Sat, 1 Feb 2025 12:14:23 +0100 Subject: [PATCH 1/2] :ambulance: Fix circular import - oops --- discord/ext/commands/help.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/discord/ext/commands/help.py b/discord/ext/commands/help.py index 4c2f1ab9fd..0ed12b26b2 100644 --- a/discord/ext/commands/help.py +++ b/discord/ext/commands/help.py @@ -32,7 +32,6 @@ from typing import TYPE_CHECKING, Any import discord.utils -from discord.ext import bridge from .core import Command, Group from .errors import CommandError @@ -1111,13 +1110,15 @@ async def send_group_help(self, group): await self.send_pages() async def send_cog_help(self, cog): + from discord.ext.bridge import BridgeExtCommand + if cog.description: self.paginator.add_line(cog.description, empty=True) filtered = await self.filter_commands( cog.get_commands(), sort=self.sort_commands, - exclude=(bridge.BridgeExtCommand,), + exclude=(BridgeExtCommand,), ) self.add_indented_commands(filtered, heading=self.commands_heading) From 750125418cc88badadd9985703245d50bcc0459f Mon Sep 17 00:00:00 2001 From: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Date: Sat, 1 Feb 2025 14:26:06 +0300 Subject: [PATCH 2/2] fix: NameError --- discord/ext/commands/help.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/discord/ext/commands/help.py b/discord/ext/commands/help.py index 0ed12b26b2..75dc6861f4 100644 --- a/discord/ext/commands/help.py +++ b/discord/ext/commands/help.py @@ -1356,6 +1356,8 @@ def get_category(command, *, no_category=no_category): await self.send_pages() async def send_cog_help(self, cog): + from discord.ext.bridge import BridgeExtCommand + bot = self.context.bot if bot.description: self.paginator.add_line(bot.description, empty=True) @@ -1370,7 +1372,7 @@ async def send_cog_help(self, cog): filtered = await self.filter_commands( cog.get_commands(), sort=self.sort_commands, - exclude=(bridge.BridgeExtCommand,), + exclude=(BridgeExtCommand,), ) if filtered: self.paginator.add_line(f"**{cog.qualified_name} {self.commands_heading}**")