File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 4
4
5
5
DISCORD_INVITE = re .compile (
6
6
r"(https?://)?(www\.)?" # Optional http(s) and www.
7
- r"(discord([.,]|dot)gg|" # Could be discord.gg/
8
- r"discord([.,]|dot)com(/|slash)invite| " # or discord.com/invite/
9
- r"discordapp([.,]|dot)com(/|slash)invite| " # or discordapp.com/invite/
7
+ r"(discord([.,]|dot)gg|" # Could be discord.gg
8
+ r"discord([.,]|dot)com| " # or discord.com/invite
9
+ r"discordapp([.,]|dot)com| " # or discordapp.com/invite
10
10
r"discord([.,]|dot)me|" # or discord.me
11
11
r"discord([.,]|dot)li|" # or discord.li
12
- r"discord([.,]|dot)io|" # or discord.io.
13
- r"((?<!\w)([.,]|dot))gg" # or .gg/
12
+ r"discord([.,]|dot)io|" # or discord.io
13
+ r"((?<!\w)([.,]|dot))gg" # or .gg
14
+ r"((/|slash|\\)(invite))?" # / or \ or 'slash' invite
14
15
r")(/|slash|\\)" # / or \ or 'slash'
15
16
r"(?P<invite>\S+)" , # the invite code itself
16
17
flags = re .IGNORECASE
You can’t perform that action at this time.
0 commit comments