Jonah Snider

@pizzafox (0)
Making a discord bot using the discord.js Commando framework
posted to Learn by TheDrone7

@TheDrone7 The client permissions weren't there when I copied your command to make my edits. It seems you tried to add it in after I posted my comment. Make sure you change it from client_permissions to clientPermissions.

The help command I posted actually has a few new features, which you can see in the run function.

As an experienced Commando user, I'm just trying to improve this tutorial to help out newcomers. I apologise if my tone seemed critical.

Making a discord bot using the discord.js Commando framework
posted to Learn by TheDrone7

@kpostal10 For starters, the bot doesn't check if it can delete the command message. Also, it should return the response message.

Knowing you can make the validation function more than one line is basic JavaScript.

If you ever run your bot on another host or Commando has an update to the help command, your changes will be lost. I strongly suggest you move it to a separate command like I did in my bot

Making a discord bot using the discord.js Commando framework
posted to Learn by TheDrone7

Command class names like fooCommand and sayCommand should be in pascal case since they are classes. There are also several other bugs in your code, I fixed them in this GitHub gist.

Additionally, you should never edit anything in node_modules since updating dependencies will overwrite anything in there. To modify the default commands, just don't register them. Instead, you can register your own if you'd like.

For other things that can't be solved by extending classes from Commando you can make a fork of the GitHub repository and use that in your bot.