aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2024-09-11 11:30:25 +0100
committerGravatar Chris Lovering <[email protected]>2024-09-11 11:30:25 +0100
commit0bd32afbdf90aef4b3eaaa0b8959c1bf8b3db48a (patch)
treed077720a4dbfcaba1f7062fbf82a5f079dcbaef0
parentIgnore symbols starting with __ in the linkcode resolver (diff)
Update Discord invite regex to also match backslash before the invite code
-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 de82a1ed..0901f1f1 100644
--- a/pydis_core/utils/regex.py
+++ b/pydis_core/utils/regex.py
@@ -11,7 +11,7 @@ DISCORD_INVITE = re.compile(
r"discord([.,]|dot)li|" # or discord.li
r"discord([.,]|dot)io|" # or discord.io.
r"((?<!\w)([.,]|dot))gg" # or .gg/
- r")(/|slash)" # / or 'slash'
+ r")(/|slash|\\)" # / or \ or 'slash'
r"(?P<invite>\S+)", # the invite code itself
flags=re.IGNORECASE
)