Set on_ready to look in the json file instead of MySQL
This commit is contained in:
parent
8553ae3b20
commit
1f0eadc9f2
4
bot.py
4
bot.py
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue