Skip to content

Instantly share code, notes, and snippets.

@ariscript
Last active July 30, 2021 21:06
Show Gist options
  • Save ariscript/584a9f42e1bd75c26cd79491cd985a71 to your computer and use it in GitHub Desktop.
Save ariscript/584a9f42e1bd75c26cd79491cd985a71 to your computer and use it in GitHub Desktop.
Good Discord bot Command Handlers

Command Handlers

This gist will present some of the best command handlers to use for making a bot using discord,js.

The reason I include my own handler here is that it is indeed one of the best options to use to make a Discord bot. It has many configuration options that allow you to extend and override many of its default behaviors, middleware (a la express), and TS typings (it was made to work in TS more than JS). One con of this handler may be that it has a rather large bundle size. It even includes type checking and provides parsed types of arguments!

This handler is quite an advanced one, similar to AeroClient. It has many of its features and uses an exported instance of a Command class (similar to cdhandler), which can provide better autocomplete features when writing JS code. For some situations it is the best handler to use due to its large feature set, which may also scare away people new to Discord.js. this one actually is better than aeroclient (mostly), nothing is better than AeroClient though. It also has TS typings, making it an excellent choice for anyone considering making a discord bot in TypeScript.

This is basically a simpler and more noob-friendly version of cdcommands.

cdhandler is an easy to use handler. This handler is known for its cooldown system. You can set a different cooldown based on what your command logic dictates. This handler also has TS typings included. IntelliSense and similar features will work well with this handler if the Command constructor is used.

This handler is a simple one, made for people new to making bots on Discord. It has several basic features, but not many bells and whistles. Nothing much to say about this one.

This handler is a rather polarizing one, many people either love it or hate it. This is the handler I used to first get into Discord.js, so I can vouch for its noob-friendliness. It has many downsides however, like having no TS support, and virtually no ways to change its configuration. Many of the other handlers here were made as a better configurable and more feature-filled alternative to this one.


Note that I have not mentioned Commando (Discord.js' own "official" handler). I am not personally a fan of it's design and creating a whole class for a command where the constructor is the code that runs, a function seems to be the better implementation of this, in my opinion.

If you would like to have your handler added here, just add a comment to this gist (or shoot me a DM on discord) and I will look at it (it must be installable via npm/yarn). If I like it, I will add it to this list.

@Exxonnnnnn
Copy link

For CDCommands:

The only downside I see with this is that the entire documentation is in the README of the repo, not on its github page.

The documentation has now been moved. You can now view it here

@mchccn
Copy link

mchccn commented May 6, 2021

@Exxonnnnnn no u cdcommands bad

@ariscript
Copy link
Author

For CDCommands:

The only downside I see with this is that the entire documentation is in the README of the repo, not on its github page.

The documentation has now been moved. You can now view it here

@Exxonnnnnn updated

Copy link

ghost commented May 12, 2021

hi

Copy link

ghost commented May 14, 2021

Hello

@JustClefory
Copy link

wew

@Townsy45
Copy link

I can vouch for Simply Discord, the creator is a cool guy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment