2026-07-16 09:24:45 -04:00
2026-07-07 21:31:16 -04:00
2026-06-30 21:13:25 -04:00
2026-06-30 21:06:36 -04:00
2026-06-30 21:16:04 -04:00
2026-06-30 21:13:25 -04:00
2026-06-30 21:07:52 -04:00
2026-06-30 21:06:36 -04:00
2026-06-30 21:13:25 -04:00
2026-07-16 09:24:45 -04:00
2026-06-30 21:13:25 -04:00

The Protector

A Custom Moderation bot I am writing for my servers and servers I am administrating.

Will become more advanced as I need more custom moderation tools.

Why

I'm creating this because a server I am an admin of recently got targeted by a spam-scam campign spamming a crypto scam image.
At the time, the owner wasn't available to grant permission for tools like Wick, so I had to come up with something on the spot; thus I created this tool.

I can now swap to another tool like Wick, but I became interested in expanding this tools functionality in ways that tools like Wick and other protection bots don't.

What

As of now, this bot will only timeout individuals caught spamming, right now everything is super hard-coded; I needed it done quickly, so a lot of things were rushed.

Once a member spams, it will run through a customizable filter, if it's deemed to be "infringing" it will mute the member and return the content to, as of currently, my user ID (this is customizable). From there it is up to the dedicated admin/moderator to ban the user if they deem it necessary.

In the future banning will be automated (see #Todo)

Todo:

Image Fingerprinting

I want to create a database of "infringing" images. When a user sends an image into the chat, it will be compared against the database of infringing images, if it's in the database, depending on severity of the image, the user will be muted or banned, if the content isn't infringing, it will be ignored. If an admin/moderator (configurable) deems an image as "infringing" they should reply to the post mentioning the bot following with the punishment; "mute" or "ban" (as of now duration will be static, mute will be a day and ban will be permananent). Once an image is deemed "infringing" the admin/moderator that sent the command will be DMed the fingerprint (unless they have DMs turned off, of which a volunteering moderator/admin will be sent the fingerprint, if one isn't set, fingerprint will not be eligable for manual removal and will need to be done through the database.) as well the fingerprint will be console logged for the bot hoster as well.

Infringing Content:

  • ReporterId - The ID of the moderator/admin who reported the infringing content.
  • GuildId - The ID of the Guild which made the initial report.
  • Global - whether this image should be considered infringing across all moderated guilds (boolean set at startup, will apply to all reported images)
  • Punishment - Whether to Ban or Mute future occurances.
  • Fingerprint - The Fingerprint of the infringing image.

If you don't want to start from 0, you can set a boolean in the code to true which will use my personal database, this will be updated live from my bot. If you use this feature, note that my file will be readonly to any other bot using it besides mine.

public_db_connection_string.txt will be updated if ever the database connection string needs to be updated, the bot will check this every 12am EST, and will be automatically swapped if it's different. Noting that this check will not happen if the readonly db boolean is false

S
Description
A Custom Moderation tool for Discord Servers
Readme MIT 55 KiB
Languages
TypeScript 95.8%
Dockerfile 4.2%