#How do I handle errors globally on bridge commands

1 messages · Page 1 of 1 (latest)

noble root
#

When I used bot.on_application_command_error it seemed like it is only called when I use the slash commands. When I use message commands It is not even called. How do I manage both type of commands?

old raven
#

you would use on_command_error for the text-based commands

noble root
#

Well when I do this

#

Only tracebacks of the exception prints

frigid wyvern
#

on_bridge_command_error if Im not wrong

noble root
#
Ignoring exception in on_message
Traceback (most recent call last):
  File "C:\Users\woohy\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\client.py", line 400, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\woohy\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\ext\commands\bot.py", line 389, in on_message     
    await self.process_commands(message)
  File "C:\Users\woohy\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\ext\commands\bot.py", line 386, in process_commands
    await self.invoke(ctx)
  File "C:\Users\woohy\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\ext\bridge\bot.py", line 144, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\woohy\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\ext\commands\core.py", line 951, in invoke        
    await self.prepare(ctx)
  File "C:\Users\woohy\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\ext\commands\core.py", line 866, in prepare       
    if not await self.can_run(ctx):
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\woohy\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\ext\commands\core.py", line 1207, in can_run      
    return await discord.utils.async_all(predicate(ctx) for predicate in predicates)  # type: ignore
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\woohy\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\utils.py", line 699, in async_all
    for elem in gen:
  File "C:\Users\woohy\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\ext\commands\core.py", line 1207, in <genexpr>    
    return await discord.utils.async_all(predicate(ctx) for predicate in predicates)  # type: ignore
                                         ^^^^^^^^^^^^^^
  File "C:\Users\woohy\Documents\Projects\SmallDain\Bot\checks.py", line 12, in check
    raise PermissionNee```
#

It seems like on_bridge_command_error also doesn't works on text-based commands

#

😦

amber flame
noble root
#

I downloaded by using pip

amber flame
viral gladeBOT
amber flame
#

the bridge are broken in the current main

noble root
#

oh then should I use the github version?

amber flame
noble root
#

still nothing changed