From a02baab42a7fae8a54a9ae2de2bdc306d50bf9eb Mon Sep 17 00:00:00 2001 From: schneefux Date: Thu, 1 Dec 2016 21:06:45 +0100 Subject: wrap into __main__ block --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'main.py') 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) -- cgit v1.3.1