AlexzanderFlores / WOKCommands

130 stars 60 forks source link

When following the Episode 5 tutorial, I get an error. #187

Closed StupidRepo closed 12 months ago

StupidRepo commented 3 years ago

I made ping.js and when I run my bot I get this:

Cannot use import statement outside a module

Code:

import { ICommand } from "wokcommands"

export default {
    category: "Test",
    description: "Pong!",

    callback: ({ message }) => {
        message.reply("Pong!")
    }
} as ICommand 
Teyxos commented 2 years ago

If you are with JS you'll need to add

{
  // ...
  "type": "module",
  // ...
} 

in package.json