mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 11:48:55 -05:00
Fix redbot.core.utils.common_filters.INVITE_URL_RE regex (#3717)
* Fix invite_url_re Found that the regex used previously could falsely catch strings such as discord member and discord gggggg which aren't invites and shouldn't be caught, testing with this regex string still catches all invite url variations while allowing these other previously caught strings to keep working * Update redbot/core/utils/common_filters.py Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com> Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
parent
b7a142c21e
commit
ffecf1ed15
@ -16,7 +16,7 @@ __all__ = [
|
|||||||
# regexes
|
# regexes
|
||||||
URL_RE = re.compile(r"(https?|s?ftp)://(\S+)", re.I)
|
URL_RE = re.compile(r"(https?|s?ftp)://(\S+)", re.I)
|
||||||
|
|
||||||
INVITE_URL_RE = re.compile(r"(discord.gg|discordapp.com/invite|discord.me)(\S+)", re.I)
|
INVITE_URL_RE = re.compile(r"(discord\.(?:gg|io|me|li)|discordapp\.com\/invite)\/(\S+)", re.I)
|
||||||
|
|
||||||
MASS_MENTION_RE = re.compile(r"(@)(?=everyone|here)") # This only matches the @ for sanitizing
|
MASS_MENTION_RE = re.compile(r"(@)(?=everyone|here)") # This only matches the @ for sanitizing
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user