reset battling in on_ready case there was a disconnect, and this was not cleared when it should be
This commit is contained in:
parent
44ff02c4ba
commit
8e2c343cc1
1 changed files with 1 additions and 0 deletions
1
bot.py
1
bot.py
|
@ -37,6 +37,7 @@ async def on_ready():
|
||||||
# Change the status upon connection to the default status
|
# Change the status upon connection to the default status
|
||||||
await bot.change_status(discord.Game(name=config.defaultStatus, type=0))
|
await bot.change_status(discord.Game(name=config.defaultStatus, type=0))
|
||||||
channel_id = config.getContent('restart_server')
|
channel_id = config.getContent('restart_server')
|
||||||
|
config.saveContent('battling',{})
|
||||||
if channel_id != 0:
|
if channel_id != 0:
|
||||||
destination = discord.utils.find(lambda m: m.id == channel_id, bot.get_all_channels())
|
destination = discord.utils.find(lambda m: m.id == channel_id, bot.get_all_channels())
|
||||||
await bot.send_message(destination, "I have just finished restarting!")
|
await bot.send_message(destination, "I have just finished restarting!")
|
||||||
|
|
Loading…
Reference in a new issue