Skip to content

Feat: Ban spammers not caught by automod #699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Asartea
Copy link
Contributor

@Asartea Asartea commented Mar 21, 2025

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

  • I have thoroughly read and understand The Odin Project Contributing Guide
  • The title of this PR follows the location of change: brief description of change format, e.g. Callbacks command: Update verbiage
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If this PR adds new features or functionality, I have added new tests
  • 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

@JustWaveThings
Copy link
Contributor

Thanks for doing this @Asartea ! I apologize for the delay. I am going to pull this down and test locally here either this weekend or sometime next week. I really appreciate you taking this on.

@JustWaveThings JustWaveThings added the Status: Under Review This issue/PR is being reviewed by at least one maintainer label Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Under Review This issue/PR is being reviewed by at least one maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Context menu action - ban spammers not caught by automod
2 participants