GitHub Repository Statistics/Info:
Discord Server:
Language:
Fork/Download For:
A Discord bot project made with the npm package discord.js version 14 and it's job to manage mails on a server, and this project includes only one Database: Quick.db. This project also handles Slash commands. Project made with ❤ by T.F.A#7524.
You can click on the star (⭐️) button above this repository if you liked this project! Thank you all. 🙏
🧌
• Node.js v16.9.0 or above.
• Discord.js v14.3.0 or above.
#1-
Go to Discord Developer Portal and then go to Applications
.
#2-
Create a new application and choose it's name.
#3-
Put your application's avatar (not important).
#4-
Go to Bot
section and turn your application into a bot.
#5-
Scroll down and enable the three disabled Privileged Gateaway Intents
intents (PRESENCE INTENT
, SERVER MEMBERS INTENT
, and MESSAGE CONTENT INTENT
).
#6-
Go to OAuth2
section, and then URL Generator
. Select the scopes bot
and application.commands
, and then scroll down to Bot Permissions, select Administrator
(For all guild permissions). Copy the link that is generated below, open a new browser tab, paste the URL, choose a server where your bot will be in, verify yourself that you are not a robot, and Done!
⚠️ WARNING: Your bot must have theAdministrator
permission on your server and above to all the server roles (Except owner roles, because they have Administrator permission already.), else your bot won't work and it is going to show a lot of errors in your IDE's console.
#1-
Go to Repl.it site and register a new account (If you are new on the site).
#2-
Fork the project by clicking on the badge above this guide Fork For: Replit
.
#3-
Click on Import from GitHub
and wait for Replit to import the repository to your project.
#4-
Type node index.js
or node .
in the Run button configuration, and then press Done
.
#5-
Go to the file config.js
and fill all the empty values of variables:
module.exports = {
Client: {
TOKEN: "", // String
ID: "" // Number
},
Handler: {
GUILD_ID: "", // Number
CATEGORY_ID: "" // Number
},
Modmail: {
INTERACTION_COMMAND_PERMISSIONS: ['Administrator'], // String & Array
MAIL_MANAGER_ROLES: [''], // Number & Array
MENTION_MANAGER_ROLES_WHEN_NEW_MAIL_CREATED: false // Boolean
}
};
• Client: TOKEN
→ Put your bot token there to connect to your bot by using your IDE.
⚠️ WARNING: Do not use this variable on Repl.it. Use it only in VSCode. Read the step #6 for more info.
• Client: ID
→ Put your bot ID there to register the slash commands.
• Handler: GUILD_ID
→ Put your server ID there to register the slash commands.
• Handler: CATEGORY_ID
→ If you want a custom category ID that you've created, place the category ID there. Else, use the slash command /setup
.
• Modmail: INTERACTION_COMMAND_PERMISSIONS
→ Put the slash commands permissions (like /close
, /setup
... etc.) some permissions like Administrator
, ManageServer
... etc.
• Modmail: MAIL_MANAGER_ROLES
→ Put there the Mails roles managers IDs. When the command /setup
is executed, a category should be created with these roles.
⚠️ NOTE: If this variable is empty, the bot always automatically set a category to @everyone role the permissionViewChannels
tofalse
. Nobody can view the mails, only Administrators or server Owners can see the category.
• Modmail: MENTION_MANAGER_ROLES_WHEN_NEW_MAIL_CREATED
→ Use true
if you want the Mail Manager roles gets mentioned when a new mail has created. If you don't want, use false
.
#6-
Go to Environment Secret Variables
(Located at your left screen with a 🔒 icon). This feature from Replit avoid attackers from accessing your secrets. Use the key as a variable, and the value is the variable's value. The key for your bot token is TOKEN
, and the value is your bot token. After finishing this, click on Add new secret
.
#7-
Click on the green button on top of your screen ► Run
to start running your project.
#8-
Enjoy! =)
Go to your server members list (Located at your right screen on Discord), right click on your bot profile and click on Message
. Type anything in the DM (Direct Message) with your bot, and your bot should respond that a mail has been successfully created. Go back to your server and check the channels in the category of ModMails, click on the created channel and start communicate. You can upload images and videos, it also works!
Do not delete a mail channel by right clicking on the mail channel and then on Delete channel
. Use the slash command /close
on the mail to close the mail, or the button Close
.
There are a lot of issues happens with some users. You can create an issue on this repository and I will respond to your opened issue(s) as fast as possible. I'm always busy, so please wait for me to respond to your issues.
Forking this repository and sharing it again without giving credits to me (T.F.A) is not acceptable. You can remove the credits in some embed messages or in bot status, but not in the main files like README.md, index.js... If you want to make a video about this repository, ask firstly to me and then I will give you the permissions to record, else, bypassing by without asking permissions will ends in a copyright warning.