diff options
| -rw-r--r-- | bot/cogs/bot.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/cogs/bot.py b/bot/cogs/bot.py index 600285cf6..3ceebd6ab 100644 --- a/bot/cogs/bot.py +++ b/bot/cogs/bot.py @@ -88,7 +88,7 @@ class Bot: """ if msg.count("\n") >= 3: # Filtering valid Python codeblocks and exiting if a valid Python codeblock is found - if re.search("```(python|py)\n((?:.*\n*)+)```", msg, re.IGNORECASE): + if re.search("```(?:py|python)\n(.*?)```", msg, re.IGNORECASE | re.DOTALL): log.trace("Someone wrote a message that was already a " "valid Python syntax highlighted code block. No action taken.") return None |