AlexzanderFlores / WOKCommands

132 stars 61 forks source link

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

Closed StupidRepo closed 8 months ago

StupidRepo commented 2 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