@@ -31,12 +31,6 @@ async def start():
31
31
await bot .load_extension (f"lib.cogs.{ cog } " )
32
32
progress .next ()
33
33
34
- # @bot.event
35
- # async def on_interaction(ctx: Interaction):
36
- # if isinstance(ctx.command, Command):
37
- # print('is Command')
38
- # raise BotNotReady()
39
-
40
34
@bot .tree .error
41
35
async def on_command_error (ctx : Interaction , exc ) -> None :
42
36
if any ([isinstance (exc , error ) for error in IGNORE_EXCEPTIONS ]):
@@ -57,8 +51,8 @@ async def on_command_error(ctx: Interaction, exc) -> None:
57
51
await bot .send (ctx , embed = embed )
58
52
elif isinstance (exc , NotFound ):
59
53
await bot .send (ctx ,
60
- embed = Embed (title = 'Not Found Error' , description = 'One or more items could not be found.' ,
61
- colour = 0xff0000 ))
54
+ embed = Embed (title = 'Not Found Error' , description = 'One or more items could not be found.' ,
55
+ colour = 0xff0000 ))
62
56
elif hasattr (exc , "original" ):
63
57
if isinstance (exc .original , HTTPException ):
64
58
embed : Embed = Embed (title = "Http Error" , description = 'Message failed to send' , colour = 0xff0000 )
@@ -75,12 +69,6 @@ async def on_command_error(ctx: Interaction, exc) -> None:
75
69
76
70
def exit_handler ():
77
71
bot .db .commit ()
78
- # try:
79
- # loop = asyncio.get_running_loop()
80
- # except RuntimeError:
81
- # loop = asyncio.new_event_loop()
82
- # loop.run_until_complete(bot.close())
83
- # asyncio.run(bot.close())
84
72
85
73
atexit .register (exit_handler )
86
74
await bot .start (bot .config .token )
0 commit comments