aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2020-07-30 19:18:08 +0200
committerGravatar GitHub <[email protected]>2020-07-30 19:18:08 +0200
commit989c4a6c5b7f62c528cd3de511466841ba7bec04 (patch)
tree13414c5c7e63772162bd6b6faf388ede839fbcc8
parentMerge pull request #1072 from python-discord/fix/message_pin (diff)
parentUse full flag name for case-insensitivity (diff)
Merge pull request #1073 from python-discord/fix/webhook_remover
Change regex so it catches new discord URL
-rw-r--r--bot/cogs/webhook_remover.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/cogs/webhook_remover.py b/bot/cogs/webhook_remover.py
index 543869215..5812da87c 100644
--- a/bot/cogs/webhook_remover.py
+++ b/bot/cogs/webhook_remover.py
@@ -8,7 +8,7 @@ from bot.bot import Bot
from bot.cogs.moderation.modlog import ModLog
from bot.constants import Channels, Colours, Event, Icons
-WEBHOOK_URL_RE = re.compile(r"((?:https?://)?discordapp\.com/api/webhooks/\d+/)\S+/?", re.I)
+WEBHOOK_URL_RE = re.compile(r"((?:https?://)?discord(?:app)?\.com/api/webhooks/\d+/)\S+/?", re.IGNORECASE)
ALERT_MESSAGE_TEMPLATE = (
"{user}, looks like you posted a Discord webhook URL. Therefore, your "