Skip to content

A Discord.js Command Class Handler example using Slash Commands and Context Menus.

License

Notifications You must be signed in to change notification settings

NTMNathan/djs-class-handler

Repository files navigation

Discord Command Handler

A Discord.js Command Class Handler example using Slash Commands and Context Menus.

Features

  • 🖱 Using Classes
  • ✅ Easy to setup
  • 💻 Stable and 99.9% Bug Free

Setup

  1. 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
  1. Create a Discord Application and name it.

bot create

  1. Rename example.env to .env and example.config to config.js and fill the required values from the Discord Bot Page. Do not show anyone these!

  2. Install Node.js v16.6 or higher by selecting the Current tab, and then "OS Name" Installer. Click here for the download page.

nodejs

  1. 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
  1. Start the bot.
node bot

Usage

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.

📚 Guides

👋 Support

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!

❤️ Thanks!

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! 😋

⚖️ License

The MIT license applies to this repository. Please see the LICENSE file to learn more.