summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2016-12-01 21:06:45 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2016-12-01 21:06:45 +0100
commita02baab42a7fae8a54a9ae2de2bdc306d50bf9eb (patch)
treeb34b082f513c52a6b75fe204a8c9029e9873764d
parent1ed7826e21222f370e8d2c1b3405818ee13b9734 (diff)
downloadVainbot-a02baab42a7fae8a54a9ae2de2bdc306d50bf9eb.tar.gz
Vainbot-a02baab42a7fae8a54a9ae2de2bdc306d50bf9eb.zip
wrap into __main__ block
-rw-r--r--main.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.py b/main.py
index 29bd6ef..51916ed 100644
--- a/main.py
+++ b/main.py
@@ -125,5 +125,6 @@ async def on_message(message):
await cli.add_roles(message.author, role)
await cli.send_message(message.channel, "Added the 'play' role.")
-threading.Timer(10 * 60, cleanup).start()
-cli.run(TOKEN)
+if __name__ == '__main__':
+ threading.Timer(10 * 60, cleanup).start()
+ cli.run(TOKEN)