From 25829e851d4d458b1501604eb55151c8aa049aff Mon Sep 17 00:00:00 2001 From: pocketjawa Date: Wed, 1 Mar 2017 19:26:29 -0500 Subject: [PATCH] Added command to restart the bot --- pocketbot.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pocketbot.py b/pocketbot.py index dee0112..95fe604 100644 --- a/pocketbot.py +++ b/pocketbot.py @@ -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) \ No newline at end of file