@@ -120,7 +120,7 @@ def decorator(func) -> BridgeCommandGroup:
120
120
async def invoke (self , ctx : ExtContext | BridgeExtContext ):
121
121
if ctx .command is not None :
122
122
self .dispatch ("command" , ctx )
123
- if br_cmd := isinstance (ctx .command , BridgeExtCommand ):
123
+ if isinstance (ctx .command , BridgeExtCommand ):
124
124
self .dispatch ("bridge_command" , ctx )
125
125
try :
126
126
if await self .can_run (ctx , call_once = True ):
@@ -131,12 +131,12 @@ async def invoke(self, ctx: ExtContext | BridgeExtContext):
131
131
await ctx .command .dispatch_error (ctx , exc )
132
132
else :
133
133
self .dispatch ("command_completion" , ctx )
134
- if br_cmd :
134
+ if isinstance ( ctx . command , BridgeExtCommand ) :
135
135
self .dispatch ("bridge_command_completion" , ctx )
136
136
elif ctx .invoked_with :
137
137
exc = errors .CommandNotFound (f'Command "{ ctx .invoked_with } " is not found' )
138
138
self .dispatch ("command_error" , ctx , exc )
139
- if br_cmd :
139
+ if isinstance ( ctx . command , BridgeExtCommand ) :
140
140
self .dispatch ("bridge_command_error" , ctx , exc )
141
141
142
142
async def invoke_application_command (
0 commit comments