Update the invite Regex to match invites with backslashes / ignore promos (#6586)

Co-authored-by: Twentysix <6267772+Twentysix26@users.noreply.github.com>
This commit is contained in:
AAA3A
2025-09-04 16:49:48 +02:00
committed by GitHub
parent d2f0f8d5ed
commit 4d24365d17

View File

@@ -16,7 +16,9 @@ __all__ = [
# regexes
URL_RE = re.compile(r"(https?|s?ftp)://(\S+)", re.I)
INVITE_URL_RE = re.compile(r"(discord\.(?:gg|io|me|li)|discord(?:app)?\.com\/invite)\/(\S+)", re.I)
INVITE_URL_RE = re.compile(
r"(?<!promos\.)(discord\.(?:gg|io|me|li)|discord(?:app)?\.com\/invite)[\/\\](\S+)", re.I
)
MASS_MENTION_RE = re.compile(r"(@)(?=everyone|here)") # This only matches the @ for sanitizing