Welcome to DiscordJS-V14-ModMail-Bot, a Discord bot project developed using the powerful npm package discord.js version 14. This bot is designed to efficiently manage modmail on a server, utilizing a single JSON database for seamless communication.
If you find this project useful, please show your support by clicking the star (⭐️) button above this repository. Thank you! 🙏
- Easy to use and set up.
- Simplifies the management of modmail.
- Robust error handling for a smooth experience.
- Transcript system.
- Node.js: version 16.9.0 or above.
- discord.js: version 14.12.0 or above.
- horizon-handler (my package): version 1.1.0 or above.
- @tfagaming/jsondb (my package): version 1.2.1 or above.
- colors: any version.
To set up the project, follow these steps:
- Run
npm init -y
in your terminal to initialize a new project. - Install the required packages by running
npm i discord.js aqify.js tfa-jsonmap colors
. - Create a
config.js
file using the providedexample.config.js
as a template. - Fill in the empty values in the
config.js
file with the required information.
Warning If you're using repl.it, use
process.env.CLIENT_TOKEN
as your bot token inconfig.js
, and then create a new key in Secrets named CLIENT_TOKEN with the value of your bot token.client: { token: process.env.CLIENT_TOKEN, id: ... }, ...
- Obtain your bot token from the Discord Developer Portal and add it to the
config.js
file. - Configure the necessary settings for your bot, such as the guild ID, category ID for modmail, staff roles, and whether to mention staff roles for new mail notifications.
- Start the bot by running
node index.js
,node .
, ornpm run start
in your terminal.
To run the project on Replit, follow these additional steps:
- Create an account on replit.com (if you don't have one already).
- Fork this project by clicking on the Fork For: Replit badge.
- Click on Import from GitHub and wait for Replit to import the repository.
- Configure the Run button to execute the appropriate command (
node index.js
,node .
, ornpm run start
). - Fill in the required values in the
config.js
file. - Set up environment secret variables for your bot token by going to Environment Secret Variables and adding a key with the name
CLIENT_TOKEN
and the corresponding bot token as the value. - Click on the green Run button to start your bot.
To run the project on Visual Studio Code, follow these additional steps:
- Download and unzip the source code.
- Open Visual Studio Code and select the unzipped folder as your workspace.
- Fill in the required values in the
config.js
file. 4. Open the terminal in Visual Studio Code and run node index.js
, node .
, or npm run start
. 5. Enjoy! =)
If you encounter any issues or have questions about this project, please create an issue on this repository. I will respond to your inquiries as quickly as possible. Your feedback is valuable and helps improve the project.
The MIT License.