diff --git a/docs/changelog.rst b/docs/changelog.rst index 010070c0..9c22af6e 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,6 +4,10 @@ Changelog ========= +- :release:`11.5.0 <17th October 2024>` +- :feature:`282` Update :obj:`pydis_core.utils.regex.DISCORD_INVITE` to cover more edge cases. + + - :release:`11.4.0 <11th September 2024>` - :feature:`269` Update :obj:`pydis_core.utils.regex.DISCORD_INVITE` to also match backslash before the invite code. diff --git a/pydis_core/utils/regex.py b/pydis_core/utils/regex.py index 0901f1f1..a78f2afb 100644 --- a/pydis_core/utils/regex.py +++ b/pydis_core/utils/regex.py @@ -4,14 +4,11 @@ DISCORD_INVITE = re.compile( r"(https?://)?(www\.)?" # Optional http(s) and www. - r"(discord([.,]|dot)gg|" # Could be discord.gg/ - r"discord([.,]|dot)com(/|slash)invite|" # or discord.com/invite/ - r"discordapp([.,]|dot)com(/|slash)invite|" # 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"((?\S+)", # the invite code itself flags=re.IGNORECASE ) diff --git a/pyproject.toml b/pyproject.toml index e3251845..1f345477 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pydis_core" -version = "11.4.0" +version = "11.5.0" description = "PyDis core provides core functionality and utility to the bots of the Python Discord community." authors = ["Python Discord "] license = "MIT"