A Discord.js Command Class Handler example using Slash Commands and Context Menus.
- 🖱 Using Classes
- ✅ Easy to setup
- 💻 Stable and 99.9% Bug Free
- Create a folder on your computer, then type the following console command to clone this repository.
git clone https://github.com/NTMNathan/djs-class-handler
- Create a Discord Application and name it.
-
Rename
example.env
to.env
andexample.config
toconfig.js
and fill the required values from the Discord Bot Page. Do not show anyone these! -
Install Node.js v16.6 or higher by selecting the Current tab, and then "OS Name" Installer. Click here for the download page.
- Install all of the required NPM modules, and
Visual Studio C++ Build Tools
on Windows (if you have issues).
npm install
npm i -g --add-python-to-path --vs2015 --production windows-build-tools
- Start the bot.
node bot
To create commands, you need to run the following command in the console:
npm run deploy
These will create a new set of commands in the server.
NOTE: You may need to wait an hour for the commands to create. 200 Command Creates per day is the limit.
Command Folder Structure:
context
folder contains the Context Menu commands.general
and other folders are slash commands.
If you have found an issue with using this command handler example or have any suggestions? Feel free to join the NTM Discord Server, send an issue or pull request. We'll be happy to help and take a look!
I am currently maintaining this repo during my spare time, so if you would like to support me. Feel free to do so by donating here on Buy me a coffee.
Also, don't forget to star the repo! 😋
The MIT
license applies to this repository. Please see the LICENSE
file to learn more.