Naval-Base / yuudachi

Discord moderation bot
https://yuudachi.dev
GNU Affero General Public License v3.0
281 stars 66 forks source link

Flagged messages count twice towards antispam #1059

Closed almostSouji closed 2 years ago

almostSouji commented 2 years ago

With the recent addition for supporting Discord native automod, messages that are flagged (but not blocked) are counted once as the message itself and once as the log towards antispam. For blocked messages, this is not an issue, since they are only posted once, as the flag; unless we want to consider a case where people spam blocked messages in the weird expectation to get it through after a few attempts.

Ideally, we would only consider blocked (not flagged) automod messages, but I currently cannot find any way to discern them, as the payloads seem identical in nature.

almostSouji commented 2 years ago

Flagged messages have a flagged_message_id named field in their embed, which is missing when blocked.

  {
            value: '984820580597510224',
            name: 'flagged_message_id',
            inline: false
   }