Dynamic Help Command

Say for example, you do not like the dynamic help command already given (gasp), this is how you would create very simple dynamic help command.

help.js
const Discord = require("discord.js");
module.exports = {
  name: "help",
  aliases: ["pong"],
  execute({ message, hkandler }) {
   let reply = []
   reply.push("Here's a list of all my commands!")
   
   hkandler.commands.forEach((cmd) => {
    reply.push(cmd.name)
   })
   
   let embed = new Discord.MessageEmbed()
    .setColor("RANDOM")
    .setDescription(reply)
   message.channel.send(embed)
   
  },
};

Last updated