summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)