Fixed Discord Bot Token being published via git
This commit is contained in:
parent
b758ee7c7d
commit
d249ce1115
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -4,6 +4,8 @@
|
||||||
# Exclude VENV
|
# Exclude VENV
|
||||||
venv/
|
venv/
|
||||||
|
|
||||||
# Exclude ChatLogs
|
# Exclude ChatLogs, DataBases and the API Token
|
||||||
|
|
||||||
chatlogs/*
|
chatlogs/*
|
||||||
|
db.sqlite3
|
||||||
|
token
|
8
run.py
8
run.py
|
@ -9,8 +9,10 @@ config = {"botname": "Sheepy",
|
||||||
"filterpings": True,
|
"filterpings": True,
|
||||||
"usechannels": [717758904527880253, 772839872557088769, 773980809471197235],
|
"usechannels": [717758904527880253, 772839872557088769, 773980809471197235],
|
||||||
"trainchannels": [[492412566430154783, 1000], [761462125696385047, 1000]],
|
"trainchannels": [[492412566430154783, 1000], [761462125696385047, 1000]],
|
||||||
"corpus": ["chatterbot.corpus.english", "chatterbot.corpus.uswest"],
|
"corpus": ["chatterbot.corpus.english", "chatterbot.corpus.uswest"]}
|
||||||
"token": "NzU2NTgxNjQ0NTY3MTgzMzcw.X2T7kA.J7RthGGYMjgE_ZreLrGo2A3tCvg"}
|
|
||||||
|
with open("token", "r") as tokenfile:
|
||||||
|
token = tokenfile.read()
|
||||||
|
|
||||||
bot = discord.Client()
|
bot = discord.Client()
|
||||||
chatbot = ChatBot(config["botname"])
|
chatbot = ChatBot(config["botname"])
|
||||||
|
@ -82,4 +84,4 @@ async def on_ready():
|
||||||
await train()
|
await train()
|
||||||
|
|
||||||
|
|
||||||
bot.run(config["token"])
|
bot.run(token)
|
||||||
|
|
Loading…
Reference in a new issue