Skip to content

Commit f801992

Browse files
committed
Ensure we don't match to non-invite looking links
1 parent 93ce65f commit f801992

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pydis_core/utils/regex.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import re
44

55
DISCORD_INVITE = re.compile(
6-
r"(https?:\/\/)?(www\.)?" # Optional http(s) and www.
7-
r"(discord(app)?)?" # Optional discord(app)
6+
r"(https?:\/\/)?(www\.)?" # Optional http(s) and www.
7+
r"(\B|discord(app)?)" # Optional discord(app)
88
r"([.,]|dot)" # Various characters to cover dots
99
r"("
1010
r"(gg|me)" # TLDs that embed within discord

0 commit comments

Comments
 (0)