Self-hosted · MIT · Node.js 20+
Logging and moderation insights for your Discord server
Modlo records joins, leaves, message edits and deletes, and moderation events to channels you choose. Each guild keeps its own settings in a local SQLite database—invite one bot to many servers.
What Modlo does
Rich embed logs, per-server configuration, and an optional AI review command for community moderation workflows.
-
Member activity
Join and leave events with clean embeds in your chosen channels.
-
Messages
Track edits and deletions so moderators never lose context.
-
Moderation events
Role changes, role deletes, and channel create/delete logs in your moderation log channel.
-
Per-server config
Use
/set-channeland/config—settings stay isolated per guild. -
AI review
/modlo reviewanalyzes recent messages (OpenAI). Configurable cooldown, public results, optional automatic timeouts when the model recommends them. -
Your infrastructure
Run on your VPS or game panel; no third-party logging SaaS required.
Install Modlo
You need Node.js 20+, a Discord application with a bot user, and an OpenAI
API key if you want /modlo review.
Discord Developer Portal
- Create an application and add a Bot user. Copy the token.
- Copy the Application ID (
CLIENT_ID). - Enable Server Members Intent and Message Content Intent.
- Invite with View Channel, Send Messages, Embed Links, Read Message History, Moderate Members, and Manage Messages.
Invite URL template
— replace YOUR_CLIENT_ID with your application ID.
Clone and run
git clone https://github.com/MercenaryUSA/modlo.git
cd modlo
npm install
cp .env.example .env
Edit .env:
DISCORD_TOKEN=your_bot_token
CLIENT_ID=your_application_id
OPENAI_API_KEY=your_openai_api_key
Optional: OPENAI_MODEL (default gpt-4o-mini).
npm run deploy-commands
npm start
For development, set DEV_GUILD_ID for instant slash-command
updates on one test server. Leave it unset in production (global commands,
up to ~1 hour to propagate).
Data & hosting
Settings live in data/modlo.sqlite. Back up that file before
reinstalls. On hosts like PebbleHost, keep data/ on persistent
storage. Set env vars in your panel and use npm start as the
process command.
Slash commands
After the bot is online, configure each server (Manage Server for most config).
| Command | Who | Purpose |
|---|---|---|
/set-channel |
Manage Server | Set join/leave, message, or moderation log channels |
/config view |
Manage Server | View log channels and review cooldown |
/config review-cooldown |
Manage Server | Server-wide cooldown for /modlo review (default 1 hour) |
/config reset-review-cooldown |
Manage Server | Clear active review cooldown |
/config review-message-limit |
Administrator | Messages included in a review (default 10, max 25) |
/modlo review |
Any member | AI review of a user’s recent messages in the current channel |
Administrators bypass the review cooldown. Members with kick, ban, or timeout permissions cannot be reviewed.