0
votes

I´m trying to make a help command with Embed but dont works

/home/container/commands/other/help.js:15
    const helpEmbed = new MessageEmbed()
          ^^^^^^^^^

SyntaxError: Unexpected identifier
    at wrapSafe (internal/modules/cjs/loader.js:931:16)
    at Module._compile (internal/modules/cjs/loader.js:979:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
    at Module.load (internal/modules/cjs/loader.js:879:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:903:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at /home/container/node_modules/require-all/index.js:56:46
    at Array.forEach (<anonymous>)
    at requireAll (/home/container/node_modules/require-all/index.js:34:9)

This is the code

enter image description here

1

1 Answers

0
votes

Basically you are using the Embed inside nothing. Your module.exports should look similiar to this:

module.exports = class extends Command {
  constructor(...args) {
    super(...args, {
      description: 'Testing.',
      category: "Information",
    });
  }

  async run(message, args) {
     
      const helpEmbed...

  }
}

The code example above is from my command handler so yours could be a little different, but you need a start point like run or execute.