1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-11-01 13:02:38 +00:00

Fix inability to start bot if not in owner server

This commit is contained in:
Myned 2019-01-03 18:06:56 -05:00
parent da16cb37df
commit 88fda1701e

View file

@ -85,9 +85,10 @@ async def on_ready():
await bot.change_presence(activity=d.Game(u.config['playing'])) await bot.change_presence(activity=d.Game(u.config['playing']))
print('\n> > > > > > > > >\nC O N N E C T E D : {}\n> > > > > > > > >\n'.format(bot.user.name)) print('\n> > > > > > > > >\nC O N N E C T E D : {}\n> > > > > > > > >\n'.format(bot.user.name))
await bot.get_channel(u.config['info_channel']).send(f'**Started** \N{BLACK SUN WITH RAYS} `{"` or `".join(u.config["prefix"])}`')
# u.notify('C O N N E C T E D')
try: try:
await bot.get_channel(u.config['info_channel']).send(f'**Started** \N{BLACK SUN WITH RAYS} `{"` or `".join(u.config["prefix"])}`')
if u.temp['startup']: if u.temp['startup']:
with suppress(err.NotFound): with suppress(err.NotFound):
if u.temp['startup'][0] == 'guild': if u.temp['startup'][0] == 'guild':
@ -104,6 +105,8 @@ async def on_ready():
checks.ready = True checks.ready = True
except KeyError: except KeyError:
u.dump({'startup': ()}, 'temp/temp.pkl') u.dump({'startup': ()}, 'temp/temp.pkl')
except AttributeError:
pass
else: else:
print('\n- - - -\nI N F O : reconnected, reinitializing tasks\n- - - -\n') print('\n- - - -\nI N F O : reconnected, reinitializing tasks\n- - - -\n')
reconnect = await bot.get_user(u.config['owner_id']).send('**RECONNECTING**') reconnect = await bot.get_user(u.config['owner_id']).send('**RECONNECTING**')