odin-bot-v2
odin-bot-v2 copied to clipboard
Feat: Ban spammers not caught by automod
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 changeformat, e.g.Callbacks command: Update verbiage - [x] The
Becausesection summarizes the reason for this PR - [x] The
This PRsection has a bullet point list describing the changes in this PR - [x] If this PR addresses an open issue, it is linked in the
Issuesection - [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