diff options
| author | 2020-03-28 17:19:40 +0200 | |
|---|---|---|
| committer | 2020-03-28 17:19:40 +0200 | |
| commit | f4b5718225505b2b78e4cbf75c5599ab307455d2 (patch) | |
| tree | ff93be29343d2c62a44a6ad0b5d476db9fb106b4 | |
| parent | (Webhook Detection): Created cog. (diff) | |
(Webhook Detection): Added webhook match regex.
| -rw-r--r-- | bot/cogs/webhook_remover.py | 4 |
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.""" |