1
0
Fork 0
mirror of synced 2024-06-01 18:29:38 +12:00

Set on_ready to look in the json file instead of MySQL

This commit is contained in:
Phxntxm 2016-07-17 12:17:42 -05:00
parent 8553ae3b20
commit 1f0eadc9f2

4
bot.py
View file

@ -24,8 +24,8 @@ async def on_ready():
# Change the status upon connection to the default status
await bot.change_status(discord.Game(name=config.defaultStatus, type=0))
channel_id = config.getContent('restart_server')
if result != 0:
destination = discord.utils.find(lambda m: m.id == result, bot.get_all_channels())
if channel_id != 0:
destination = discord.utils.find(lambda m: m.id == channel_id, bot.get_all_channels())
await bot.send_message(destination, "I have just finished restarting!")
config.saveContent('restart_server',0)