Fixed finish checks so the bot doesnt react in wrong channels

This commit is contained in:
blackfur 2021-01-22 16:16:33 +01:00
parent 11feee7e66
commit a601800229

3
run.py
View file

@ -96,12 +96,12 @@ async def on_ready():
@bot.event
async def on_message(message):
if finished:
if message.author != bot.user:
if message.channel.id in config["usechannels"]:
if message.content.startswith(config["excludeprefix"]):
return
else:
if finished:
response = chatbot.get_response(message.content)
response = response.__str__()
if config["filterpings"]:
@ -118,4 +118,5 @@ async def on_message(message):
else:
await message.channel.send("Sorry, the Bot is still performing some tasks.")
bot.run(config["token"])