mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-05 18:58:53 -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:
parent
d2f0f8d5ed
commit
4d24365d17
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user