creates token.txt if it doesn't exist

This commit is contained in:
NikolajDanger
2020-04-03 00:52:31 +02:00
parent d840c36013
commit a6b3798010

View File

@ -27,6 +27,16 @@ except:
funcs.logThis("destinyPoints.txt didn't exist. Making it now.") funcs.logThis("destinyPoints.txt didn't exist. Making it now.")
with open("resources/destinyPoints.txt","w") as f: with open("resources/destinyPoints.txt","w") as f:
f.write("") 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: finally:
f.close() f.close()