Attachment spam limits to 6 attachments but messages can contain 10 attachments
Example: https://discord.com/channels/267624335836053506/463035268514185226/1431497703447199774
This leads to some false positives when a gallery of 7 or more attachments are sent on a message.
https://github.com/python-discord/bot/blob/2640aaa5665426e5350b3ce81a743a9f4c3898aa/bot/exts/filtering/_filters/antispam/attachments.py#L12-L21
It would be great to support full 10 attachments before triggering this rule so a single message with 10 attachments doesn't trigger the antispam rule.
If this gets approved I can work on it if @onerandomusername is not interested.
I am changing the scope slightly of this.
We will not support messages with more than 6 attachments still, as anything over that just generates huge screen filling messages that don't really have a place in Python Discord.
However, for the first instance of a user posting >6 attachments we should not mute, just delete & notify the user (all should be possible through the existing filter system).
If a user then continues to post attachments within a certain cooldown period (let's say 2 minutes), we should then apply the filter in the regular fashion and apply a tempmute.
I see no harm in allowing 10 attachments when we allow three embeds from websites:
The ten (media) attachments is smaller than 3 embeds from GitHub. This should be considered when moderating 10 attachments on messages.
Not all attachments form media galleries.
We could filter and run introspection on the types of attachments and allow 10 in specific cases.
Six file embeds is still longer than a gallery of ten images. Which would still be allowed.
Specifically, how I should have made this issue:
when all attachments are media image files, they should not be deleted if the user sends more than 6 of other kinds, they should be warned but not immediately timed out.
This has been discussed internally amongst Moderators and the specified behaviour above maintaining the max 6 attachments (but improving the UX for users caught by the filter) is what has been decided.
In future (and in separate issues), maybe we should think about:
- Auto-suppressing embeds when a message has loads of them, because it is just as noisy
- Lowering the attachment limit to something lower (e.g. 3) if the attachments are non-images.
For this specific issue though, the specification here is what should be implemented.