Skip to content

A modern, feature-rich Discord modmail bot that enables private communication between users and staff through a ticket system.

License

AGPL-3.0, Unknown licenses found

Licenses found

AGPL-3.0
LICENSE
Unknown
LICENSE-VCL.md
Notifications You must be signed in to change notification settings

VTubersTV/modmail-bot

Discord Modmail Bot

A modern, feature-rich Discord modmail bot that enables private communication between users and staff through a ticket system.

Features

  • 🎫 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

Project Structure

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

Prerequisites

  • Node.js 16.x or higher
  • A Discord bot token
  • A Discord server with appropriate permissions

Setup

  1. Clone the repository:
git clone https://github.com/vtuberstv/modmail-bot.git
cd modmail-bot
  1. Install dependencies:
npm install
  1. 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
  1. Build the project:
npm run build
  1. Start the bot:
npm start

For development with hot-reload:

npm run dev

Usage

For Users

  1. DM the bot to create a new ticket
  2. The bot will create a private channel for staff to respond
  3. Continue the conversation in DMs with the bot

For Staff

  1. When a user DMs the bot, a new channel is created in the specified category
  2. Staff can respond in the ticket channel
  3. Messages are automatically forwarded to the user
  4. Use !close in the ticket channel to close the ticket

Development

Adding New Features

  1. Create new files in the appropriate directories
  2. Follow the existing code structure and patterns
  3. Add proper TypeScript types
  4. Update documentation as needed

Testing

  1. Create a test Discord server
  2. Set up a test bot token
  3. Use the development mode for testing changes

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A modern, feature-rich Discord modmail bot that enables private communication between users and staff through a ticket system.

Topics

Resources

License

AGPL-3.0, Unknown licenses found

Licenses found

AGPL-3.0
LICENSE
Unknown
LICENSE-VCL.md

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project