diff options
| author | 2021-08-16 20:19:09 +0200 | |
|---|---|---|
| committer | 2021-08-16 20:19:09 +0200 | |
| commit | e8b22358c579cca3447a1db29c93c85f65bb6f56 (patch) | |
| tree | 905c658b5d4cac81a2346a81a21c571849e0d7bb | |
| parent | Improve code consistency in webhook_remover (diff) | |
Fix up, and improve code consistency in webhook_remover
| -rw-r--r-- | bot/exts/filters/webhook_remover.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/exts/filters/webhook_remover.py b/bot/exts/filters/webhook_remover.py index 040ae93b6..50bb4bef7 100644 --- a/bot/exts/filters/webhook_remover.py +++ b/bot/exts/filters/webhook_remover.py @@ -13,7 +13,7 @@ WEBHOOK_URL_RE = re.compile(r"((?:https?://)?discord(?:app)?\.com/api/webhooks/\ ALERT_MESSAGE_TEMPLATE = ( "{user}, looks like you posted a Discord webhook URL. Therefore, your " - "message has been removed, alongside with your webhook." + "message has been removed, and your webhook has been deleted." "You can re-create it if you wish to. If you believe this was a " "mistake, please let us know." ) @@ -75,7 +75,7 @@ class WebhookRemover(Cog): matches = WEBHOOK_URL_RE.search(msg.content) if matches: - async with self.bot.http_session.delete(msg.content) as resp: + async with self.bot.http_session.delete(matches[0]) as resp: # The Discord API Returns a 204 NO CONTENT response on success. deleted_successfully = resp.status == 204 await self.delete_and_respond(msg, matches[1] + "xxx", webhook_deleted=deleted_successfully) |