From 9385e911cb7c117f3971171ea45cb4d9d641a1b2 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Thu, 17 Oct 2024 22:29:39 +0100 Subject: Add optional 'app' capture to invite regex OR group --- pydis_core/utils/regex.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'pydis_core/utils') diff --git a/pydis_core/utils/regex.py b/pydis_core/utils/regex.py index 1ccc0813..f51b6159 100644 --- a/pydis_core/utils/regex.py +++ b/pydis_core/utils/regex.py @@ -5,12 +5,11 @@ import re DISCORD_INVITE = re.compile( r"(https?://)?(www\.)?" # Optional http(s) and www. r"(" - r"discord([.,]|dot)gg|" # Could be discord.gg - r"discord([.,]|dot)com|" # or discord.com/invite - r"discordapp([.,]|dot)com|" # or discordapp.com/invite - r"discord([.,]|dot)me|" # or discord.me - r"discord([.,]|dot)li|" # or discord.li - r"discord([.,]|dot)io|" # or discord.io + 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"((?