From 4df8e90cc4b21896de4f37042ed3186547aa708b Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Thu, 17 Oct 2024 22:35:13 +0100 Subject: Move discord(app) capture to its own optional group in invite regex --- pydis_core/utils/regex.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pydis_core/utils/regex.py b/pydis_core/utils/regex.py index f51b6159..f78229ff 100644 --- a/pydis_core/utils/regex.py +++ b/pydis_core/utils/regex.py @@ -4,13 +4,13 @@ import re DISCORD_INVITE = re.compile( r"(https?://)?(www\.)?" # Optional http(s) and www. + r"(discord(app)?)?" # Optional discord(app) r"(" - r"discord(app)?([.,]|dot)gg|" # Could be discord(app).gg - r"discord(app)?([.,]|dot)com|" # or discord(app).com/invite - r"discord(app)?([.,]|dot)me|" # or discord(app).me - r"discord(app)?([.,]|dot)li|" # or discord(app).li - r"discord(app)?([.,]|dot)io|" # or discord(app).io - r"((?