File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,6 @@ async def on_application_command_error(
25
25
if isinstance (error , errors .CheckFailure ):
26
26
return
27
27
28
- # ignore command not found errors
29
- if isinstance (error , commands .errors .CommandNotFound ):
30
- return
31
-
32
28
# handle every other error
33
29
error_logger .error (
34
30
f"An error occurred in { ctx .channel .name } by { ctx .author .display_name } " ,
@@ -49,6 +45,14 @@ async def on_application_command_error(
49
45
50
46
await ctx .respond (DEFAULT_ERROR_MESSAGE , ephemeral = True )
51
47
48
+ @commands .Cog .listener ()
49
+ async def on_command_error (
50
+ self , ctx : commands .Context , error : commands .CommandError
51
+ ):
52
+ # ignore command not found errors
53
+ if isinstance (error , commands .errors .CommandNotFound ):
54
+ return
55
+
52
56
# BUG: Actually test this, make it wave InteractionResponded error:
53
57
@commands .Cog .listener ()
54
58
async def on_interaction_error (
You can’t perform that action at this time.
0 commit comments