mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 08:52:31 -05:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user