A modern, feature-rich Discord modmail bot that enables private communication between users and staff through a ticket system.
- π« Automatic Ticket Creation: Creates private channels when users DM the bot
- π¬ Two-way Communication: Seamless communication between users and staff
- π Attachment Support: Handles file attachments in both directions
- π Secure Channels: Private channels with proper permission management
- π¨ Rich Embeds: Beautiful embeds for ticket creation and management
- β‘ TypeScript: Built with TypeScript for better type safety and maintainability
modmail-bot/
βββ src/
β βββ commands/ # Bot commands
β βββ config/ # Configuration files
β βββ events/ # Event handlers
β βββ types/ # TypeScript type definitions
β βββ utils/ # Utility functions and classes
β βββ index.ts # Main entry point
βββ .env # Environment variables (create this)
βββ package.json # Project dependencies
βββ tsconfig.json # TypeScript configuration
- Node.js 16.x or higher
- A Discord bot token
- A Discord server with appropriate permissions
- Clone the repository:
git clone https://github.com/vtuberstv/modmail-bot.git
cd modmail-bot
- Install dependencies:
npm install
- Create a
.env
file in the root directory:
BOT_TOKEN=your_bot_token_here
MAIN_GUILD_ID=your_guild_id_here
TICKET_CATEGORY_ID=your_category_id_here
- Build the project:
npm run build
- Start the bot:
npm start
For development with hot-reload:
npm run dev
- DM the bot to create a new ticket
- The bot will create a private channel for staff to respond
- Continue the conversation in DMs with the bot
- When a user DMs the bot, a new channel is created in the specified category
- Staff can respond in the ticket channel
- Messages are automatically forwarded to the user
- Use
!close
in the ticket channel to close the ticket
- Create new files in the appropriate directories
- Follow the existing code structure and patterns
- Add proper TypeScript types
- Update documentation as needed
- Create a test Discord server
- Set up a test bot token
- Use the development mode for testing changes
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.