Some random & useless Discord bot built with discord.js.
- Node.js >= 20
- MySQL 8
- Redis
git clone https://github.com/Choomai/choomai-bot
cd choomai-bot
npm installRename .env.example to .env in the project root and modify it accordingly
mysql -u root -p Discord < schema.sqlnpm run syncnode app.js- Buy a domain
- Enable HTTPS (choose either one of these):
- Setup DNS record to point to your server, and install a certificate (Let's Encrypt is free btw)
- Enable Proxied mode using Cloudflare, and install their Origin Certificates
- Add rate-limiting
Expose Express server directly to the internet without a reverse proxy is not recommended, as it lacks features like HTTPS termination and rate-limiting which are essential for security and performance.
A docker-compose.yaml is provided that bundles the bot, MySQL 8, and Redis together.
# Configure enviroment variables & a reverse proxy before running.
docker compose up -dA pre-built image is published to the GitHub Container Registry and updated automatically on every version bump at ghcr.io/choomai/choomai-bot:latest
Manages AFK timers, useful for games like VALORANT where you need to step away for a set duration.
| Subcommand | Description |
|---|---|
set <time> [interval] |
Set your AFK timer. time and optional interval use duration syntax (e.g. 30m, 2h, 1d). |
interval <time> |
Update the notification interval on an existing timer. Minimum 30 minutes. |
check [user] |
Check how much time a user (or yourself) has left. |
clear |
Cancel your AFK timer. |
leaderboard |
Show the top 10 users with the longest remaining AFK time. |
When the timer expires, the bot sends you a DM. If an interval is set, it will DM you a reminder at each interval.
Disconnects everyone from the voice channel you are currently in.
- Requires Move Members permission.
- Also available as a message command:
@BotName dcall - Has a 30 second cooldown.
Sets the channel where the bot will log command usage and automatic moderation actions.
- Requires Manage Server permission.
- Logs include: command issuer, command name, and auto-mute events.
Moves all members from one voice channel to another.
from: The voice channel to move members fromto: The voice channel to move members to- Requires Move Members permission.
Replies with Pong!. Useful for checking if the bot is alive.
Displays the live status of Choomai infrastructure, including:
- CPU load and temperature
- RAM usage
- Network RX/TX
- Docker container count
- Website (nginx), VPN, and Minecraft server reachability
Has a 10 second cooldown.
Initiates a member verification process to gain access to the server.
- Generates a unique verification link and sends it via DM
- Requires completing a Cloudflare Turnstile CAPTCHA challenge
- Automatically assigns the Member role upon successful verification
- Verification links expire after 10 minutes
- Each member can only verify 3 times before being disabled for 6 hours
Creates and manages private voice channels.
| Subcommand | Description |
|---|---|
new <user> [category] [hidden] |
Create a private VC for yourself and one other user. hidden (default: true) hides it from the channel list entirely; set to false to show it with a locked icon instead. |
add <user> <vc> |
Allow an additional user to join an existing private VC. |
remove <user> <vc> |
Remove a previously allowed user from a private VC. |
purge |
Delete all empty private VCs. Requires Manage Channels permission. |
Private VCs are automatically deleted once they have been empty for 5 minutes.
Sends a Wake-on-LAN magic packet to a device on your network.
ip: IP address or hostname of the targetmac: MAC address of the target device (e.g.AA:BB:CC:DD:EE:FF)port: UDP port to send the packet to (1–65535)
The bot automatically times out members who join and leave a voice channel within 5 seconds, issuing a 10 minutes timeout. Members with the Manage Channels permission are exempt. The action is logged to the configured log channel.