mirror of
https://github.com/myned/modufur.git
synced 2024-12-24 22:27:28 +00:00
Added on_ready() error catching
This commit is contained in:
parent
148ecd37b0
commit
cecb3a8af8
1 changed files with 21 additions and 22 deletions
|
@ -69,6 +69,7 @@ async def test(ctx):
|
|||
|
||||
@bot.event
|
||||
async def on_ready():
|
||||
if not is_ready():
|
||||
from cogs import booru, info, management, owner, tools
|
||||
|
||||
for cog in (tools.Utils(bot), owner.Bot(bot), owner.Tools(bot), management.Administration(bot), info.Info(bot), booru.MsG(bot)):
|
||||
|
@ -110,8 +111,6 @@ async def on_message(message):
|
|||
|
||||
@bot.event
|
||||
async def on_error(error, *args, **kwargs):
|
||||
print(bot.is_closed())
|
||||
print(bot.is_ready())
|
||||
print('\n! ! ! ! !\nE R R O R : {}\n! ! ! ! !\n'.format(error), file=sys.stderr)
|
||||
tb.print_exc()
|
||||
await bot.get_user(u.config['owner_id']).send('**ERROR** \N{WARNING SIGN}\n```\n{}```'.format(error))
|
||||
|
|
Loading…
Reference in a new issue