Skip to content

VolvoxLLC/volvox-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

855 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Volvox.Bot

CI Coverage Status License: MIT Node.js

AI-powered Discord bot for the Volvox developer community. Built with discord.js v14 and powered by Claude.

✨ Features

AI & Chat

  • 🧠 AI Chat β€” Mention the bot to chat with Claude. Maintains per-channel conversation history with intelligent context management.
  • 🎯 Smart Triage β€” Two-step evaluation (fast classifier + responder) that drives chime-ins and community rule enforcement.
  • πŸ€– AI Auto-Moderation β€” Intelligent automated moderation powered by Claude. Analyzes messages for toxicity, spam, and harassment with configurable thresholds and actions.
  • πŸ‘πŸ‘Ž AI Feedback β€” Users can rate AI responses with thumbs up/down reactions. Feedback tracked in dashboard analytics.
  • 🚫 AI Channel Blocklist β€” Configure channels the bot ignores for AI responses. Supports thread inheritance.

Community & Engagement

  • πŸ‘‹ Dynamic Welcome Messages β€” Contextual onboarding with template variables ({user}, {server}, {memberCount}), multiple variants, and per-channel configs.
  • 🎭 Reaction Roles β€” Role menus where users get roles by reacting. Custom/Unicode emoji support, built-in templates.
  • ⏰ Temporary Roles β€” Assign roles that auto-expire after a duration.
  • 🎀 Voice Activity Tracking β€” Track voice channel activity for insights and leaderboards.
  • ⭐ Starboard β€” Highlight popular messages with star reactions.
  • πŸ“Š Reputation/XP System β€” Track engagement and award XP/levels.
  • πŸ’€ AFK System β€” Set AFK status; bot notifies mentioners and DMs ping summaries on return.

Moderation

  • βš”οΈ Moderation Suite β€” Full toolkit: warn, kick, ban, tempban, softban, timeout, purge, lock/unlock, slowmode.
  • πŸ›‘οΈ Protected Roles β€” Admins/mods protected from moderation actions.
  • πŸ“‹ Bulk Actions β€” Perform actions on multiple users at once.
  • πŸ”‡ Channel Quiet Mode β€” Temporarily silence the bot via @bot quiet.
  • πŸ“ Scheduled Announcements β€” Schedule one-time or recurring messages.

Configuration & Management

  • βš™οΈ Runtime Config β€” All settings in PostgreSQL with live /config command and web dashboard.
  • πŸ’Ύ Backup & Restore β€” Export/import config with automatic scheduled backups.
  • πŸ”„ Command Aliases β€” Custom shortcuts for commands (e.g., /w β†’ /warn).
  • πŸ“ˆ Performance Monitoring β€” Real-time memory, CPU, response time tracking with alerting.
  • πŸ“‘ Webhook Notifications β€” Outbound webhooks for bot events (mod actions, errors, config changes).

Dashboard & Analytics

  • 🌐 Web Dashboard β€” Next.js admin panel with Discord OAuth2, dark/light themes, mobile support.
  • πŸ“Š Analytics β€” Message activity, command usage, voice time, AI feedback, engagement metrics with PDF export.
  • πŸ“œ Audit Log β€” Complete action history with filtering, CSV/JSON export, WebSocket streaming.
  • πŸ” Conversation Viewer β€” Browse AI conversation history with search and filtering.

Infrastructure

  • ⚑ Redis Caching β€” Distributed caching for config, Discord API, reputation, rate limiting.
  • πŸ”’ Security β€” HMAC webhooks, prototype pollution protection, input validation, secrets management.
  • πŸ“Š Health Monitoring β€” Built-in health checks and status reporting.

πŸ—οΈ Architecture

Discord User
     β”‚
     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Volvox.Bot  │────▢│   Claude API β”‚
β”‚  (Node.js)  │◀────│   (Anthropic)β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β–Ό              β–Ό              β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  PostgreSQL  β”‚ β”‚  Redis   β”‚ β”‚  Web     β”‚
β”‚  (Config +   β”‚ β”‚  (Cache  β”‚ β”‚  Dashboardβ”‚
β”‚   State)     β”‚ β”‚   + RL)  β”‚ β”‚           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“‹ Prerequisites

πŸš€ Setup

1. Clone and install

git clone https://github.com/VolvoxLLC/volvox-bot.git
cd volvox-bot
pnpm install

2. Configure environment

cp .env.example .env

3. Configure the bot

Edit config.json to match your Discord server.

4. Set up Discord bot

  1. Create app at discord.com/developers/applications
  2. Bot β†’ Add Bot β†’ Copy token β†’ DISCORD_TOKEN
  3. Enable Privileged Gateway Intents:
    • βœ… Message Content Intent
    • βœ… Server Members Intent
    • βœ… Guild Voice States Intent
    • βœ… Guild Message Reactions Intent
  4. OAuth2 β†’ URL Generator:
    • Scopes: bot, applications.commands
    • Permissions: View Channels, Send Messages, Read Message History, Manage Messages, Add Reactions, Manage Roles
  5. Invite bot to server

5. Run

pnpm start

πŸ”‘ Environment Variables

Required

Variable Description
DISCORD_TOKEN Discord bot token
ANTHROPIC_API_KEY Anthropic API key
DATABASE_URL PostgreSQL connection string

Optional

Variable Description Default
REDIS_URL Redis connection string (recommended) β€”
BOT_API_SECRET Secret for web dashboard API β€”
WEBHOOK_SECRET Secret for webhook HMAC signing SESSION_SECRET
SENTRY_DSN Sentry error tracking DSN β€”
LOG_LEVEL Logging level info

Web Dashboard

Variable Description
NEXTAUTH_URL Dashboard canonical URL
NEXTAUTH_SECRET JWT encryption secret
DISCORD_CLIENT_ID Discord OAuth2 client ID (required for pnpm deploy)
DISCORD_CLIENT_SECRET Discord OAuth2 client secret

For one-off guild-scoped command deploys (dev only), use:

pnpm deploy -- --guild-id <your_guild_id>

βš™οΈ Configuration

All configuration in config.json, editable via /config command or web dashboard.

Key Sections

  • ai β€” AI chat, feedback, channel blocklist
  • aiAutoMod β€” Auto-moderation thresholds and actions
  • triage β€” Message triage and daily budget
  • welcome β€” Welcome messages with templates
  • moderation β€” Mod features and protected roles
  • backup β€” Auto-backup schedule and retention
  • performance β€” Monitoring and alert thresholds

See config.json for complete options.

πŸ§ͺ Testing

pnpm test              # Run tests
pnpm test:coverage     # With coverage (80% threshold)
pnpm lint              # Lint check

πŸ“š Documentation

  • Dashboard Guide β€” Coming soon
  • Backup Guide β€” Coming soon
  • Troubleshooting β€” Coming soon
  • API Reference β€” Coming soon

🀝 Contributing

See CONTRIBUTING.md for development workflow and conventions.

πŸ“„ License

MIT License β€” see LICENSE.


Built with ❀️ by the Volvox team.

Releases

No releases published

Contributors