The slash/application command handler which I use. It's a modified version from this handler, which is made by Nathaniel-VFX. He (or she/something else, idk tbh) did an amazing job.
I did change some stuff like add config files for colors, emojis and default embeds and overal changed it a bit to my needs & way of doing things. I decided to put it on GitHub to make it easy for me to clone the handler for my projects (which I won't ever finish). Feel free to use it
The branches are different variants of the command handler. This is a list of the current branches.
More branches somewhere in the future
- Commands handler
- Events handler
- Permissions handler (botPerms: [ ] & userPerms: [ ])
- Cooldowns (Using Discord.js' Collection)
- Config files
- Colors (main, done, fail, error, pending) | E.g.
client.c.main
- Emotes (done, fail, error, pending) | E.g.
client.e.done
- Prebuilt embeds
/* With args: fail(desc) - done(desc) - cooldown(duration) You likely never need to use 'cooldown()', but you can change the text */ interaction.reply(client.embeds.done('Target assasinated')); // Without args: loading(), error() interaction.reply(client.embeds.error);
- Colors (main, done, fail, error, pending) | E.g.
- You can use this template by clicking the "Use this template" button. Run
yarn install
,npm install
or whatever package manager you use. - Change the
.env.example
to.env
and fill in the bot token and bot ID.
Guild ID is only needed if you're planning on using the bot in 1 server or for testing purposes. Planning on using it in multiple guilds? Just leave it empty and it should work.