aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MrAwesomeRocks <[email protected]>2020-08-31 08:17:57 -0500
committerGravatar MrAwesomeRocks <[email protected]>2020-08-31 08:17:57 -0500
commit9c52a99a03777cdfd728f354cdb305398791eac1 (patch)
tree75ef8404914d3d14015ba393c0e0a98311892358
parentEveryone Ping: PR Review 2 (diff)
Everyone Ping: Regex Fix
Changed the regex to not punish users who have text other than `@everyone` in their codeblocks. Multiline codeblocks can now have `@everyone` in them.
-rw-r--r--bot/rules/everyone_ping.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/rules/everyone_ping.py b/bot/rules/everyone_ping.py
index 3a8174e44..560a9ec14 100644
--- a/bot/rules/everyone_ping.py
+++ b/bot/rules/everyone_ping.py
@@ -8,8 +8,8 @@ from bot.constants import Colours, Guild, NEGATIVE_REPLIES
# Generate regex for checking for pings:
guild_id = Guild.id
-EVERYONE_RE_INLINE_CODE = re.compile(rf"(?!`)@everyone(?!`)|(?!`)<@&{guild_id}>(?!`)")
-EVERYONE_RE_MULTILINE_CODE = re.compile(rf"(?!```\n.*)@everyone(?!\n.*```)|(?!```\n.*)<@&{guild_id}>(?!\n.*```)")
+EVERYONE_RE_INLINE_CODE = re.compile(rf"^(?!`)@everyone(?!`)$|^(?!`)<@&{guild_id}>(?!`)$")
+EVERYONE_RE_MULTILINE_CODE = re.compile(rf"^(?!```)@everyone(?!```)$|^(?!```)<@&{guild_id}>(?!```)$")
async def apply(