A simple slash-command handler for Discord.JS, (requires discord.js@latest)
Explore the docs »
NOTE: This is a little outdated, and the code quality isn't so good. However, it should still work!
- Add
interactionEvent.js.js
to a folder within your root directory. - Add the snippet of code (
ready-event-snippet.js
) to your ready event. - Create a folder called "interactions" and add all of your code there for slash commands.
You don't have to have your like this, but it's how I've set it up in the code so if you wish to edit it, you can :D
root/
├─ index.js
|
├─ interactions/
│ ├─ ping.js
│ ├─ foobar.js
|
├─ events/
│ ├─ ready.js
| ├─ interactionEvent.js
- I've added the module.export example in the example folder that you need in all of your slash command files (
interactions/
) in order for them to register. - If you need any help, join my discord or open up an issue on this repository.
- Let me know of any suggestions or improvements you have, but yeh! Enjoy :)