GitHub Repository Statistics/Info:
Language:
Fork/Download For:
The Discord bot project made with the npm package of discord.js version 14. It handles prefix commands, slash commands, events, components, multiple languages and logging. You can create as many commands as you want to shape your Bot as you want. Project made with ❤ by Da4ndo.
You can click on the star (⭐️) button above this repository if you liked this project! Thank you all. 🙏
Discord.js Documentation is linked here.
Note: There are a few basic PrefixCommands/SlashCommands/Events/Components added.
Important Note: While the code has been tested, there may still be issues, especially around permission to execute commands. Keep in mind that the included commands, components, and slash commands are examples and should be customized before deployment.
- Updated handlers to load all valid command files in their directory and all its subdirectories, regardless of how deep the subdirectories go
- Fixed forgetten false reference for configs
- More basic slash commands (userinfo, serverinfo, avatar)
(More in CHANGELOG.md)
Run the following command:
npm install
OR
npm install discord.js @discordjs/rest ms dotenv moment mongoose
Set token and client id in .env, and modify settings to your preference in config.json
(Checkout documentation file here.)
The bot can work in two ways, either with a database or not.
Supported database is MongoDB. You can enable the database by setting the database key to true. You need a link/IP address for the bot (e.g.: mongodb://root:<password>@link.mongodb.net/mydb
or mongodb://mongo:27017/mydb
or mongodb://172.19.0.2/
). For local database use docker-compose.yml.
Run the following command:
npm run start
OR
docker-compose up
-
Modify bot.service name to <your_bot_name>.service and fill the missing data in it.
-
Now you need to put it in the system services folder:
sudo mv <your_bot_name>.service /etc/systemd/system/<your_bot_name>.service
- How to start:
sudo systemctl start <your_bot_name>
You can view it's logs using the following command:
journalctl -u <your_bot_name>
or use this command to tail the log:
journalctl -fu <your_bot_name>
For more information checkout DOCS.md.