Skip to content

Commit 23434f0

Browse files
committed
Add optional 'app' capture to invite regex OR group
1 parent 3ee615e commit 23434f0

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

pydis_core/utils/regex.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
DISCORD_INVITE = re.compile(
66
r"(https?://)?(www\.)?" # Optional http(s) and www.
77
r"("
8-
r"discord([.,]|dot)gg|" # Could be discord.gg
9-
r"discord([.,]|dot)com|" # or discord.com/invite
10-
r"discordapp([.,]|dot)com|" # or discordapp.com/invite
11-
r"discord([.,]|dot)me|" # or discord.me
12-
r"discord([.,]|dot)li|" # or discord.li
13-
r"discord([.,]|dot)io|" # or discord.io
8+
r"discord(app)?([.,]|dot)gg|" # Could be discord(app).gg
9+
r"discord(app)?([.,]|dot)com|" # or discord(app).com/invite
10+
r"discord(app)?([.,]|dot)me|" # or discord(app).me
11+
r"discord(app)?([.,]|dot)li|" # or discord(app).li
12+
r"discord(app)?([.,]|dot)io|" # or discord(app).io
1413
r"((?<!\w)([.,]|dot))gg" # or .gg
1514
r")"
1615
r"(/|slash|\\)" # / or \ or 'slash'

0 commit comments

Comments
 (0)