Skip to content

nyxirisxyz/Discord-ModMail-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

📬 Advanced Components V2 ModMail Bot Template

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.

✨ Features

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

🛠️ Installation & Setup Guide

1. Prerequisites

  • Node.js (v16.11.0 or higher recommended)
  • A Discord Bot application created via the Discord Developer Portal.

2. Install Dependencies

Open your terminal inside the project root directory and run the following command to download the required packages:

npm install discord.js dotenv

3. Environment Variables Configuration (.env)

Create 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_ID

⚠️ Important: Make sure to toggle and enable both MESSAGE CONTENT INTENT and SERVER MEMBERS INTENT under the "Bot" tab within your Discord Developer Portal application settings.

4. Customizing Your Bot Settings

You 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
};

5. Running the Bot

Once everything is fully configured, execute the main entry file to launch your bot application:

node index.js

📝 License & Contributing

This 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 (⭐) ^^

About

A flexible, production-ready Discord ModMail/Support template featuring modern Components V2 layouts (Containers, TextDisplays, Separators) with dynamic configuration, automatic role setup, and interactive modals.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors