From 670533b6a0fd625103e552e6fe7f02db9322f057 Mon Sep 17 00:00:00 2001 From: L3viathan Date: Thu, 27 Aug 2026 20:44:00 +0200 Subject: [PATCH] Update Discord invite regex again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allows for the period to instead be "。", a HALFWIDTH IDEOGRAPHIC FULL STOP which Discord apparently normalizes into a period for the purpose of making the invite clickable. --- pydis_core/utils/regex.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pydis_core/utils/regex.py b/pydis_core/utils/regex.py index 26b1a547b..fed79f395 100644 --- a/pydis_core/utils/regex.py +++ b/pydis_core/utils/regex.py @@ -4,10 +4,10 @@ DISCORD_INVITE = re.compile( r"(https?:\/\/)?(discord:\/*)?" # Optional protocols - r"(www\.)?" # Optional www + r"(www[.,。])?" # Optional www r"[@#]*" # Optional @ or # symbols r"(\B|discord(app)?)" # Optional discord(app) - r"([.,]|dot)" # Various characters to cover dots + r"([.,。]|dot)" # Various characters to cover dots r"(" r"(gg|me)" # TLDs that embed within discord r"|com(\/|slash|\\)invite" # Only match com/invite