Added command to restart the bot

dev
pocketjawa 2017-03-01 19:26:29 -05:00
parent 87c49ef71e
commit 25829e851d
1 changed files with 9 additions and 0 deletions

View File

@ -140,6 +140,15 @@ def on_message(message):
porn_multi_r = list(earthporn) + list(serverporn) + list(cableporn) + list(foodporn) + list(shittyfoodporn)
yield from client.send_message(message.channel, random.choice(porn_multi_r).url)
#Kill the bot so it can be reloaded
elif (message.content.lower().startswith('!kill')) or (message.content.lower().startswith('!restart')):
author_id = message.author
if author_id == owner_id:
yield from client.send_message(message.channel, 'Goodbye Onii-chan!!!')
yield from client.close()
else:
yield from client.send_message(message.channel, 'Booooo you\'re not Onii-chan. You\'re not allowed to use this command!')
client.loop.create_task(ups_check())
client.run(token)