aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ionite34 <[email protected]>2022-08-16 18:29:48 -0400
committerGravatar ionite34 <[email protected]>2022-08-16 18:29:48 -0400
commit4ff87abda66ac8c6b988477c03fd7163f95e259f (patch)
tree25de85f48ae61f88fa8c8896a911adb37f6cad80
parentMerge pull request #114 from python-discord/8.0.0-beta (diff)
Added regex for leading https or www
-rw-r--r--botcore/utils/regex.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/botcore/utils/regex.py b/botcore/utils/regex.py
index 56c50dad..e074a342 100644
--- a/botcore/utils/regex.py
+++ b/botcore/utils/regex.py
@@ -3,6 +3,7 @@
import re
DISCORD_INVITE = re.compile(
+ r"((https?://)?(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/