The source code of the helper bot for the SupportMail support server.
If you want to use this code, you can do so by forking this repository and modifying the code to fit your needs.
-
Node.js (version 20 or higher)
-
bun package manager
-
MongoDB database
-
pm2 for process management (for production use) - install globally with bun!
bun add -g pm2
-
Discord Bot Token from the Discord Developer Portal
-
Sentry account (required)
Fork this repository to your own GitHub account to create a personal copy of the code.
git clone https://github.com/<your-username>/<repositoryname>.git
cd <repositoryname>bun installCreate environment files in the root directory, based on the .env.example file:
.env.dev: For development environment variables.env.production: For production environment variables
- Invite your bot to your Discord server with the necessary permissions
- Set up the required channels and roles according to your server structure
- Customize configuration values in the source code as needed
Development mode:
bun devProduction mode (with PM2):
# Start the bot
./start.sh
# Stop the bot
pm2 stop sm-helper
# Restart the bot
pm2 restart sm-helper
# View logs
pm2 logs sm-helper
# Monitor the bot
pm2 monitNote
Production mode uses PM2 for process management. The bot will automatically restart on crashes and can be managed with PM2 commands.
bun buildThis doesn't have any output though as Bun handles builds internally.
The bot requires the following Discord permissions:
- Send Messages
- Use Slash Commands
- Manage Messages
- Manage Threads
- Add Reactions
- Read Message History
- Embed Links
- Attach Files
- Mention Everyone
- Use External Emojis
The bot uses MongoDB to store data. Make sure your MongoDB instance is running and accessible via the MONGODB_URI in your environment file. The bot will automatically create the necessary collections and indexes on startup.
Please refer to the FEATURES.md file for a detailed list of current features, components, event-driven automations, cron jobs, database models, caches, utilities, and configuration options.
MIT
- Add a way to input
ends_aton/incident createfield for maintenance