Fixed Discord Bot Token being published via git

master
BuildTools 2021-01-13 11:45:30 +01:00
parent b758ee7c7d
commit d249ce1115
2 changed files with 9 additions and 5 deletions

6
.gitignore vendored
View File

@ -4,6 +4,8 @@
# Exclude VENV
venv/
# Exclude ChatLogs
# Exclude ChatLogs, DataBases and the API Token
chatlogs/*
chatlogs/*
db.sqlite3
token

8
run.py
View File

@ -9,8 +9,10 @@ config = {"botname": "Sheepy",
"filterpings": True,
"usechannels": [717758904527880253, 772839872557088769, 773980809471197235],
"trainchannels": [[492412566430154783, 1000], [761462125696385047, 1000]],
"corpus": ["chatterbot.corpus.english", "chatterbot.corpus.uswest"],
"token": "NzU2NTgxNjQ0NTY3MTgzMzcw.X2T7kA.J7RthGGYMjgE_ZreLrGo2A3tCvg"}
"corpus": ["chatterbot.corpus.english", "chatterbot.corpus.uswest"]}
with open("token", "r") as tokenfile:
token = tokenfile.read()
bot = discord.Client()
chatbot = ChatBot(config["botname"])
@ -82,4 +84,4 @@ async def on_ready():
await train()
bot.run(config["token"])
bot.run(token)