A Discord bot that uses AI to moderate server content. This bot can analyze messages, detect inappropriate content, and help maintain a positive community environment.
- AI-powered content moderation
- Multiple AI model support
- Server-specific configuration
- Logging of moderation actions
- Debug and moderation log channels
- Discord slash commands for easy configuration
- Bun runtime (v1.2.4 or newer)
- Discord bot token
- Database (supported by Prisma)
-
Clone the repository:
git clone https://github.com/mikndotdev/ai-mod.git cd ai-mod
-
Install dependencies:
bun install
-
Configure environment variables: Create a
.env
file with the following:DATABASE_URL="your-database-url" DISCORD_TOKEN="your-discord-bot-token" GOOGLE_GENERATIVE_AI_API_KEY="your-google-generative-ai-api-key" GROQ_API_KEY="your-groq-api-key"
-
Initialize the database:
bunx prisma migrate dev
bun run src/index.ts
/settings
- View current server settings (requires Manage Server permission)- More commands available for configuration and moderation
The bot can be deployed using Docker:
docker build -t ai-mod .
docker run -d --env-file .env ai-mod
Alternatively, you can pull the pre-built image:
docker pull ghcr.io/mikndotdev/mod-ai:latest