open-source Discord moderation bot that actually doesn't suck—powerful, privacy-friendly, and stays out of your way
- spam detection with Perspective
- toxicity, hate speech and nsfw image detection with OpenAI
- message rate-limiting using token buckets
- duplicate message prevention
- self-harm detection
- whitelisting
- custom blocklists
- privacy-friendly
-
openai api key for handling moderation requests. these are free, no credit card or billing required. set this as
OPENAI_API_KEY
in your .env (main filtering) -
google cloud project with perspective api enabled (used for spam filtering and as a fallback)
you'll need to create an API key here and add it to your
.env
asGOOGLE_API_KEY
. restricting it to "Perspective Comment Analyzer API" is optional but recommended. -
discord bot token and client ID
-
bun runtime installed
to install dependencies:
bun install
to run:
bun run start
perspective has an extremely high false positive rate and isn't as flexible. it's still used for spam detection tho since their spam filters are actually pretty good.
while wick is kind of decent-ish, it's closed-source, owned by a sketchy company, not that privacy, and also not that good.
discord's built-in moderation is very much lacking and is missing a lot of features.
- cleanup command
this project was created with Bun, a fast all-in-one JavaScript runtime.