Added more Temporary project files to .gitignore, Added notification in the console when the bot is ready
This commit is contained in:
parent
f5a1db99fe
commit
14af9a1859
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -8,4 +8,6 @@ venv/
|
|||
|
||||
chatlogs/
|
||||
db.sqlite3
|
||||
db.sqlite3-shm
|
||||
db.sqlite3-wal
|
||||
config.yml
|
|
@ -1,7 +0,0 @@
|
|||
botname: "ChatBot"
|
||||
excludeprefix: "!"
|
||||
filterpings: True
|
||||
usechannels: []
|
||||
trainchannels: [[]]
|
||||
corpus: ["chatterbot.english"]
|
||||
token: "TOKEN"
|
3
run.py
3
run.py
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue