A Discord bot for managing voice channels and tracking user activity.
- Dynamic voice channel creation and deletion
- Automatic cleanup of empty channels
- Offline lobby channel for when the bot is down
- Automatic user migration from offline lobby to new channels on bot restart
- Customizable channel naming and user limits
- Voice channel ownership management
- Automatic ownership assignment based on activity
- Track user time spent in voice channels
- View statistics for different time periods (last week, last month, all time)
- Top users leaderboard
- Individual user statistics
- Last seen tracking with
/seen
command - Weekly voice channel activity announcements
- Cron-style scheduling
- Top 10 most active users
- Special mentions for top 3 users
- Admin manual trigger option
- PLEX price checking
- Ping command
- Am I Kool command with role-based verification
- Comprehensive logging system
- Clean shutdown handling
- Type-safe configuration
DISCORD_TOKEN
: Your Discord bot tokenGUILD_ID
: Your Discord server IDCLIENT_ID
: Your Discord application client ID
ENABLE_VC_MANAGEMENT
: Enable/disable voice channel management (true/false)VC_CATEGORY_NAME
: Name of the category for voice channelsLOBBY_CHANNEL_NAME
: Name of the lobby channelLOBBY_CHANNEL_NAME_OFFLINE
: Name of the offline lobby channelVC_CHANNEL_PREFIX
: Prefix for dynamically created channelsVC_SUFFIX
: Suffix for dynamically created channels
ENABLE_VC_TRACKING
: Enable/disable voice channel trackingENABLE_SEEN
: Enable/disable last seen trackingENABLE_VC_WEEKLY_ANNOUNCEMENT
: Enable/disable weekly announcementsVC_ANNOUNCEMENT_CHANNEL
: Channel name for weekly announcementsVC_ANNOUNCEMENT_SCHEDULE
: Cron-style schedule for announcements (default: "0 16 * * 5" for Friday at 4 PM)
MONGODB_URI
: MongoDB connection string
ENABLE_PING
: Enable/disable ping commandENABLE_AMIKOOL
: Enable/disable amikool commandENABLE_PLEX_PRICE
: Enable/disable plex price checking
COOL_ROLE_NAME
: Name of the role for kool verificationVC_TRACKING_ADMIN_ROLES
: Comma-separated list of admin role names
DEBUG
: Enable/disable debug modeNODE_ENV
: Environment (development/production)
/seen @user
: Check when a user was last seen in a voice channel/vcstats
: View your voice channel statistics/vctop
: View voice channel leaderboard/transfer-ownership @user
: Transfer ownership of your voice channel/announce-vc-stats
: Manually trigger weekly announcement (Admin only)
/ping
: Check bot latency/plexprice
: Check current PLEX price/amikool
: Check if you're kool (requires role verification)
- Clone the repository
- Copy
.env.example
to.env
and fill in your configuration - Install dependencies:
npm install
- Build the project:
npm run build
- Start the bot:
npm start
The recommended way to deploy KoolBot is using Docker Compose, which will set up both the bot and its MongoDB database.
- Make sure you have Docker and Docker Compose installed
- Copy
.env.example
to.env
and configure your settings - Start the services:
docker-compose up -d
To view logs:
docker-compose logs -f
To stop the services:
docker-compose down
To rebuild and restart:
docker-compose up -d --build
If you prefer to run the bot without docker-compose, you can use these commands:
-
Build the image:
docker build -t koolbot .
-
Run the container:
docker run -d \ --name koolbot \ --env-file .env \ --network koolbot-network \ koolbot
Note: When running manually, you'll need to ensure MongoDB is available and the network is properly configured.
- TypeScript
- Discord.js
- MongoDB
- Winston for logging
- Cron for scheduling
- ESLint for code linting
- TypeScript for type safety
- Proper error handling
- Comprehensive logging
MIT