mirror of
https://github.com/myned/modufur.git
synced 2024-11-01 21:02:38 +00:00
WIP fix for reconnection issues
This commit is contained in:
parent
9f487cb57c
commit
313dda5096
1 changed files with 272 additions and 266 deletions
10
src/run.py
10
src/run.py
|
@ -102,7 +102,14 @@ async def on_ready():
|
|||
|
||||
checks.ready = True
|
||||
else:
|
||||
print('\n- - - -\nI N F O : reconnected, skipping initialization\n- - - -')
|
||||
print('\n- - - -\nI N F O : reconnected, reinitializing\n- - - -')
|
||||
|
||||
for cog in (tools.Utils(bot), owner.Bot(bot), owner.Tools(bot), management.Administration(bot), info.Info(bot), booru.MsG(bot)):
|
||||
bot.add_cog(cog)
|
||||
print(f'COG : {type(cog).__name__}')
|
||||
|
||||
if u.config['playing'] is not '':
|
||||
await bot.change_presence(game=d.Game(name=u.config['playing']))
|
||||
|
||||
|
||||
@bot.event
|
||||
|
@ -136,7 +143,6 @@ async def on_error(error, *args, **kwargs):
|
|||
u.dump(u.temp, 'temp/temp.pkl')
|
||||
# u.notify('E R R O R')
|
||||
await bot.logout()
|
||||
u.close(bot.loop)
|
||||
|
||||
|
||||
@bot.event
|
||||
|
|
Loading…
Reference in a new issue