From a6b37980102b79098ba9af8a77e361970192bef2 Mon Sep 17 00:00:00 2001 From: NikolajDanger Date: Fri, 3 Apr 2020 00:52:31 +0200 Subject: [PATCH] creates token.txt if it doesn't exist --- Gwendolyn.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Gwendolyn.py b/Gwendolyn.py index 2685357..f526cf5 100644 --- a/Gwendolyn.py +++ b/Gwendolyn.py @@ -27,6 +27,16 @@ except: funcs.logThis("destinyPoints.txt didn't exist. Making it now.") with open("resources/destinyPoints.txt","w") as f: f.write("") +finally: + f.close() +# Creates token.txt +try: + f = open("token.txt","r") +except: + funcs.logThis("token.txt didn't exist. Write your bot token in the file.") + with open("resources/destinyPoints.txt","w") as f: + f.write("Replace this line with bot token") + finally: f.close()