aboutsummaryrefslogtreecommitdiffstats
path: root/tests/cogs/test_antispam.py
diff options
context:
space:
mode:
authorGravatar Sebastiaan Zeeff <[email protected]>2019-09-15 01:23:49 +0200
committerGravatar Sebastiaan Zeeff <[email protected]>2019-09-15 01:32:04 +0200
commit14a67c187a38b9748fee375e15cfc9f6aa10fc6f (patch)
treebf9b4d7046d7ae08389e4daeba108513f4fc8132 /tests/cogs/test_antispam.py
parentFix 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 'tests/cogs/test_antispam.py')
0 files changed, 0 insertions, 0 deletions