An advanced, open-source, and fully customizable Discord ModMail/Support bot template leveraging Discord's modern Components V2 interface structures (Containers, TextDisplays, Separators, etc.). It allows server members to establish a secure, instant, and private communication line with server staff simply by sending a Direct Message (DM) to the bot.
- Modern Components V2 Layouts: Replaces outdated standard embed blocks with clean, native, and modern Discord V2 Container designs.
- Plug-and-Play Setup (ready & guildCreate): On startup or when joining a new server, the bot automatically verifies if your custom support role exists; if not, it builds it instantly.
- Smart Automation Configuration: Automatically configures the designated role to be hoisted (displayed separately in the member list) and mentionable. It also dynamically adjusts server hierarchy levels.
- Guild Mention Trigger: When any member tags your configured support role within a text channel, the bot automatically dispatches a stylish V2 layout card explaining how to open a support ticket via DMs.
- Interaction Modals: Staff members can seamlessly answer incoming user tickets via clean, native Discord pop-up input windows (Modals) triggered by action buttons.
- Node.js (v16.11.0 or higher recommended)
- A Discord Bot application created via the Discord Developer Portal.
Open your terminal inside the project root directory and run the following command to download the required packages:
npm install discord.js dotenvCreate a file named .env in the root directory of your project and configure your application credentials:
TOKEN=YOUR_DISCORD_BOT_TOKEN
STAFF_CHANNEL_ID=YOUR_STAFF_LOGS_CHANNEL_IDYou don't need to dive deep into the source code to change basic behaviors. Open index.js and edit the CONFIG object at the top of the file:
const CONFIG = {
roleName: 'Your Custom Role Name', // Change the name of the automatically created role
roleColor: '#FF0000', // Change the Hex color of the support role
statusText: 'Your Status Message' // Custom "Playing..." status text message
};Once everything is fully configured, execute the main entry file to launch your bot application:
node index.jsThis project is completely open-source. Feel free to fork it, modify it, add new features, or customize it for your community's needs. If you find this repository useful, please consider dropping a star (⭐) ^^