Skip to content

Adds "this-is-scam" message context command#1505

Open
Zabuzard wants to merge 10 commits into
developfrom
feature/this_is_scam_command
Open

Adds "this-is-scam" message context command#1505
Zabuzard wants to merge 10 commits into
developfrom
feature/this_is_scam_command

Conversation

@Zabuzard

@Zabuzard Zabuzard commented Jun 19, 2026

Copy link
Copy Markdown
Member

Overview

This adds a new message context command (right click message) called this-is-scam. It acts as the primary way for users to report scam to mods.

Mods then get presented a quick way to handle the scam properly by automatically deleting all messages from the user and putting them under quarantine through a single button press!

grafik

Internally this works by quarantine, ban (delete messages from one day), unban in that order. The user ends up being kicked out of the guild (due to the ban) but can immediately rejoin (due to the unban), but remains quarantined.

Other

The following extra situations are handled gracefully via in-memory caches:

  • multiple users report the same message as scam: only one is being processed
  • a user tries to abuse the command by using it constantly: users are on cooldown for 1 minute

Also, an appropriate entry in the audit-log of the user (/audit) is created.

Attachments are spelled out so it becomes easier for devs later on to edit ScamBlocker accordingly.

Code

The integration is minimal and simple, just a straightforward single class is added ThisIsScamCommand.java, thats it. No config changes, everything easy.

Impressions

Context Menu

grafik

Response

grafik

What mods see

grafik grafik

No scam

grafik

Yes scam

grafik

DM

grafik

Quarantined

grafik

Audit Log

grafik

Edge cases

grafik grafik

Error

grafik

@Zabuzard Zabuzard self-assigned this Jun 19, 2026
@Zabuzard Zabuzard requested a review from a team as a code owner June 19, 2026 12:44
@Zabuzard Zabuzard added new command Add a new command or group of commands to the bot priority: major labels Jun 19, 2026
SquidXTV
SquidXTV previously approved these changes Jun 19, 2026
surajkumar
surajkumar previously approved these changes Jun 19, 2026

@firasrg firasrg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Zabuzard for the great work you've put into this. I'm genuinely impressed by the scope of the changes and the amount of effort behind them. I've left comments, mostly focused on long-term maintainability and readability. I didn't spend much time reviewing the logic itself, as I trust you've given that aspect the attention it deserves.

christolis
christolis previously approved these changes Jun 20, 2026

@christolis christolis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for your contribution 👍

@Zabuzard Zabuzard dismissed stale reviews from christolis, surajkumar, and SquidXTV via 2bd77ea June 22, 2026 07:51
@Zabuzard

Copy link
Copy Markdown
Member Author

CRs done, thanks 👍 Please check again.

Also, while at it, I added the account age to the footer (might be useful in some situations and was easy to add):
grafik

SquidXTV
SquidXTV previously approved these changes Jun 22, 2026
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new command Add a new command or group of commands to the bot priority: major

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants