From 2b5e35c5c7da11a2ec2e7d6e276d7b9486eda52b Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 12 Aug 2016 16:01:05 +0200 Subject: [PATCH] Read the token from discordtoken.txt --- .gitignore | 1 + main.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b35bf9e0..3efbd1ab 100644 --- a/.gitignore +++ b/.gitignore @@ -138,3 +138,4 @@ $RECYCLE.BIN/ # Windows shortcuts *.lnk .idea/ +discordtoken.txt diff --git a/main.py b/main.py index 332a5792..bcd0de1d 100644 --- a/main.py +++ b/main.py @@ -10,4 +10,9 @@ async def on_ready(): print(client.user.name) print(client.user.id) -client.run("token") +# Get the discord bot token from "discordtoken.txt" +f = open("discordtoken.txt", "r") +token = f.read() +f.close() + +client.run(token)