aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_core/utils
diff options
context:
space:
mode:
authorGravatar Janine vN <[email protected]>2025-07-13 14:00:30 -0400
committerGravatar GitHub <[email protected]>2025-07-13 14:00:30 -0400
commit7a0f529835ec5f3f09b0924848e0be9f0230d310 (patch)
treed62248e3e8d765ce5683cce234080415491a23d2 /pydis_core/utils
parentDisable A005 errors (diff)
Update discord invite regex
Allows for more than one `\` that occurs before the invite code, which is apparently valid.
Diffstat (limited to 'pydis_core/utils')
-rw-r--r--pydis_core/utils/regex.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pydis_core/utils/regex.py b/pydis_core/utils/regex.py
index 88a4c52f..ba6b9b01 100644
--- a/pydis_core/utils/regex.py
+++ b/pydis_core/utils/regex.py
@@ -10,7 +10,7 @@ DISCORD_INVITE = re.compile(
r"(gg|me)" # TLDs that embed within discord
r"|com(\/|slash|\\)invite" # Only match com/invite
r")"
- r"(/|slash|\\)" # / or \ or 'slash'
+ r"(/|slash|\\+)" # / or 'slash' or 1+ of \
r"(?P<invite>\S+)", # the invite code itself
flags=re.IGNORECASE
)