odin-bot-v2 icon indicating copy to clipboard operation
odin-bot-v2 copied to clipboard

Feat: Ban spammers not caught by automod

Open Asartea opened this issue 7 months ago • 1 comments

Because

#686

This PR

  • Modifies the Ban Spammer action to also work in non-automod log channels
  • if used outside the auto mod channel, shows an ephermal reply to the moderator asking them whether or not all messages by the spammer should be deleted, kept, or if the action should be cancelled
  • If cancelled it cancels, as well as if it has been more than a minute since the action was called
  • If messages should be kept it deletes the user without deleting their messages
    • the exception to this is the original message the action was called on: that always gets deleted (per issue comment)
  • Otherwise it bans the user and deletes their messages sent in the last week
  • Adds new tests and removes redundant ones
  • (chore: changes ephemeral: true to flags: MessageFlags.Ephermeral in replies touched)

Issue

Closes #686

Additional Information

Pull Request Requirements

  • [x] I have thoroughly read and understand The Odin Project Contributing Guide
  • [x] The title of this PR follows the location of change: brief description of change format, e.g. Callbacks command: Update verbiage
  • [x] The Because section summarizes the reason for this PR
  • [x] The This PR section has a bullet point list describing the changes in this PR
  • [x] If this PR addresses an open issue, it is linked in the Issue section
  • [x] If this PR adds new features or functionality, I have added new tests
  • [x] If applicable, I have ensured all tests related to any command files included in this PR pass, and/or all snapshots are up to date

Asartea avatar Mar 21 '25 13:03 Asartea