A Discord bot for the Mr. Mine Discord server, providing game information, moderation tools, and automated responses.
- Slash commands for game-specific information (e.g.,
/faq,/bosses,/chests). Find all commands insrc/commands/. - Moderation tools (e.g.,
/ban,/kick). - Automatic role assignment based on user's in-game progress (via DMed save files).
- Automated responses to frequently asked questions.
- Basic auto-moderation capabilities for chat.
npm installCopy the example environment file and fill in your bot's details:
cp .env.example .envThen, edit .env and provide:
DISCORD_TOKEN: Your Discord bot token.DISCORD_CLIENT_ID: Your bot's client ID.DISCORD_GUILD_ID: The ID of the Discord server (guild) where the bot will operate.
If you are developing locally, you may want to use a dedicated test server and its ID for
DISCORD_GUILD_ID.
Each chat-driven feature can be switched off without a code change. Set the flag to false to disable it, true or omit it to leave it on. Any other value stops the bot at startup rather than guessing.
| Flag | Feature | Reads message text |
|---|---|---|
AUTO_RESPONDER_ENABLED |
Canned replies to common questions asked in chat | yes |
BUG_REPORT_FORMAT_ENABLED |
Deletes bug reports missing the Report: prefix |
yes |
MOBILE_BUG_REPORT_FORMAT_ENABLED |
Deletes mobile bug reports missing the platform prefix | yes |
IDEA_FORMAT_ENABLED |
Deletes ideas missing the Idea: prefix, adds vote reactions |
yes |
GOOGLE_PLAY_SPAM_MOD_ENABLED |
Removes the Google Play spam message | yes |
NITRO_SCAM_MOD_ENABLED |
Bans nitro scam posts | yes |
INVITE_LINK_MOD_ENABLED |
Removes discord.gg links from new members |
yes |
SLUR_BAN_MOD_ENABLED |
Bans new members posting slurs | yes |
RAPID_MESSAGE_SPAM_MOD_ENABLED |
Bans 6 messages in 8 seconds from new members | no |
CROSS_CHANNEL_SPAM_MOD_ENABLED |
Bans posting to 4+ channels in 10 seconds | no |
The Message Content privileged intent is requested only while at least one text-reading feature is on. Turn all eight off and the bot connects without it. The startup log reports which features are disabled and whether the intent was requested.
npm startIf the configuration is correct, the bot should appear online in Discord, and its slash commands will be registered/updated for the specified guild.
To type-check without running:
npm run typecheckThis project uses Biome for consistent code style and quality:
npm run biomeSimply create a new release in GitHub and the website will be automatically deployed to the server.
Note
How it works: When you create a new Github release, a GitHub Action will merge the main branch into the production branch and Forge will deploy the changes. The deployment is handled by Laravel Forge using the production branch.
Note
Always create releases from the main branch to ensure all tested changes are included in the deployment.
Deploy script used in Forge:
cd /home/forge/mine-bot
git pull --tags origin $FORGE_SITE_BRANCH
# Ensure logs directory exists
mkdir -p logs
npm install --omit=dev
# Restart the application using PM2 ecosystem config
pm2 reload ecosystem.config.cjs --env production || pm2 start ecosystem.config.cjs --env production
pm2 saveThis project is licensed under the MIT License (as specified in package.json).