Prompts for bot token on first time startup

This commit is contained in:
NikolajDanger
2020-04-09 00:43:00 +02:00
parent 0374cdc84e
commit 9602be3b03
4 changed files with 18 additions and 5 deletions

View File

@ -162,9 +162,10 @@ def makeFiles():
try:
f = open("token.txt","r")
except:
logThis("token.txt didn't exist. Write your bot token in the file.")
with open("resources/token.txt","w") as f:
f.write("Replace this line with bot token")
logThis("token.txt didn't exist. Write your bot token below, or in token.txt later.")
token = input()
with open("token.txt","w") as f:
f.write(token)
finally:
f.close()