Added more Temporary project files to .gitignore, Added notification in the console when the bot is ready

master
blackfur 2021-01-21 17:26:20 +01:00
parent 48d5be83d7
commit aada203639
3 changed files with 4 additions and 8 deletions

2
.gitignore vendored
View File

@ -8,4 +8,6 @@ venv/
chatlogs/
db.sqlite3
db.sqlite3-shm
db.sqlite3-wal
config.yml

View File

@ -1,7 +0,0 @@
botname: "ChatBot"
excludeprefix: "!"
filterpings: True
usechannels: []
trainchannels: [[]]
corpus: ["chatterbot.english"]
token: "TOKEN"

3
run.py
View File

@ -91,6 +91,7 @@ async def on_ready():
chatbot = ChatBot(config["botname"])
global finished
finished = True
print("Starting to listen to messages...")
@bot.event
@ -98,7 +99,7 @@ async def on_message(message):
if finished:
if message.author != bot.user:
if message.channel.id in config["usechannels"]:
if message.content.startswith(config["exclutionprefix"]):
if message.content.startswith(config["excludeprefix"]):
return
else:
response = chatbot.get_response(message.content)