aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar kraktus <[email protected]>2019-12-05 17:49:28 +0000
committerGravatar GitHub <[email protected]>2019-12-05 17:49:28 +0000
commit52163d775a6a0737f32a0c291e9275a910656fab (patch)
treebb54210fbfba5ca983b1c7e2b1c5e8c4151f827c
parentMerge branch 'master' into token_and_bad_code (diff)
Requested change
Include the check about whether or not there is a token in the posted message in `parse_codeblock` boolean.
-rw-r--r--bot/cogs/bot.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/bot/cogs/bot.py b/bot/cogs/bot.py
index 53221cd8b..f79e00454 100644
--- a/bot/cogs/bot.py
+++ b/bot/cogs/bot.py
@@ -236,9 +236,10 @@ class Bot(Cog):
)
and not msg.author.bot
and len(msg.content.splitlines()) > 3
+ and not TokenRemover.is_token_in_message(msg)
)
- if parse_codeblock and not TokenRemover.is_token_in_message(msg): # no token in the msg
+ if parse_codeblock: # no token in the msg
on_cooldown = (time.time() - self.channel_cooldowns.get(msg.channel.id, 0)) < 300
if not on_cooldown or DEBUG_MODE:
try: