Fixed finish checks so the bot doesnt react in wrong channels
This commit is contained in:
parent
11feee7e66
commit
a601800229
3
run.py
3
run.py
|
@ -96,12 +96,12 @@ async def on_ready():
|
||||||
|
|
||||||
@bot.event
|
@bot.event
|
||||||
async def on_message(message):
|
async def on_message(message):
|
||||||
if finished:
|
|
||||||
if message.author != bot.user:
|
if message.author != bot.user:
|
||||||
if message.channel.id in config["usechannels"]:
|
if message.channel.id in config["usechannels"]:
|
||||||
if message.content.startswith(config["excludeprefix"]):
|
if message.content.startswith(config["excludeprefix"]):
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
|
if finished:
|
||||||
response = chatbot.get_response(message.content)
|
response = chatbot.get_response(message.content)
|
||||||
response = response.__str__()
|
response = response.__str__()
|
||||||
if config["filterpings"]:
|
if config["filterpings"]:
|
||||||
|
@ -118,4 +118,5 @@ async def on_message(message):
|
||||||
else:
|
else:
|
||||||
await message.channel.send("Sorry, the Bot is still performing some tasks.")
|
await message.channel.send("Sorry, the Bot is still performing some tasks.")
|
||||||
|
|
||||||
|
|
||||||
bot.run(config["token"])
|
bot.run(config["token"])
|
||||||
|
|
Loading…
Reference in a new issue