diff options
author | 2019-12-05 17:49:28 +0000 | |
---|---|---|
committer | 2019-12-05 17:49:28 +0000 | |
commit | 52163d775a6a0737f32a0c291e9275a910656fab (patch) | |
tree | bb54210fbfba5ca983b1c7e2b1c5e8c4151f827c | |
parent | Merge 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.py | 3 |
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: |