aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ks123 <[email protected]>2020-03-28 17:19:40 +0200
committerGravatar ks123 <[email protected]>2020-03-28 17:19:40 +0200
commitf4b5718225505b2b78e4cbf75c5599ab307455d2 (patch)
treeff93be29343d2c62a44a6ad0b5d476db9fb106b4
parent(Webhook Detection): Created cog. (diff)
(Webhook Detection): Added webhook match regex.
-rw-r--r--bot/cogs/webhook_remover.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bot/cogs/webhook_remover.py b/bot/cogs/webhook_remover.py
index 982359410..49cf94de7 100644
--- a/bot/cogs/webhook_remover.py
+++ b/bot/cogs/webhook_remover.py
@@ -1,7 +1,11 @@
+import re
+
from discord.ext.commands import Cog
from bot.bot import Bot
+WEBHOOK_URL_RE = re.compile(r"discordapp\.com/api/webhooks/\d+/\S+/?")
+
class WebhookRemover(Cog):
"""Scan messages to detect Discord webhooks links."""