Skip to content

🤖 A (/) command, event, permissions & cooldowns handler for Discord.js V14. MySQL database in the 'mysql' branch.

License

Notifications You must be signed in to change notification settings

Fyxren/discord.js-v14-handler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord.js-V14-handler

A command & event handler for Discord.js V14

discord.js github fork github generate template


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

Branches

The branches are different variants of the command handler. This is a list of the current branches.

  • Main | The basic handler
  • MySQL | Support for MySQL

More branches somewhere in the future

Features

  • 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);

Setting up

  • 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.

Contact

If you need any help, you can contact me through Discord.

⭐ Feel free to star the repo if you like it and check out the handler from Nathaniel on which this one is built.