diff options
author | 2019-09-15 01:23:49 +0200 | |
---|---|---|
committer | 2019-09-15 01:32:04 +0200 | |
commit | 14a67c187a38b9748fee375e15cfc9f6aa10fc6f (patch) | |
tree | bf9b4d7046d7ae08389e4daeba108513f4fc8132 /scripts/deploy-azure.sh | |
parent | Fix cog error handler check when command is None (diff) |
Fix AntiSpam sending duplicate messages to API
https://github.com/python-discord/bot/issues/412
https://github.com/python-discord/bot/issues/410
The AntiSpam cog had a bug that caused it to send the same messages
in more than one request to the deleted messages API endpoint. Since
the API rejects duplicate messages, all requests containing a duplicate
message were rejected, even if the request contained new messages as
well.
This commit fixes that by gathering up all the messages of a single
spam event into a single DeletionContext and sending that instead.
This commit also prevents the bot fomr being bricked by a single
misconfigured antispam configuration. Instead of raising a bare
exception, it will now log the validation error and alert moderation
on server that antispam has been disabled.
closes #412, closes #410
Diffstat (limited to 'scripts/deploy-azure.sh')
0 files changed, 0 insertions, 0 deletions