diff --git a/discord/ext/bridge/bot.py b/discord/ext/bridge/bot.py index c9baecb034..1d9a36f37d 100644 --- a/discord/ext/bridge/bot.py +++ b/discord/ext/bridge/bot.py @@ -120,7 +120,7 @@ def decorator(func) -> BridgeCommandGroup: async def invoke(self, ctx: ExtContext | BridgeExtContext): if ctx.command is not None: self.dispatch("command", ctx) - if br_cmd := isinstance(ctx.command, BridgeExtCommand): + if isinstance(ctx.command, BridgeExtCommand): self.dispatch("bridge_command", ctx) try: if await self.can_run(ctx, call_once=True): @@ -131,12 +131,12 @@ async def invoke(self, ctx: ExtContext | BridgeExtContext): await ctx.command.dispatch_error(ctx, exc) else: self.dispatch("command_completion", ctx) - if br_cmd: + if isinstance(ctx.command, BridgeExtCommand): self.dispatch("bridge_command_completion", ctx) elif ctx.invoked_with: exc = errors.CommandNotFound(f'Command "{ctx.invoked_with}" is not found') self.dispatch("command_error", ctx, exc) - if br_cmd: + if isinstance(ctx.command, BridgeExtCommand): self.dispatch("bridge_command_error", ctx, exc) async def invoke_application_command(