Home > Blockchain >  Stuck on Command/Event Handlers in discord.js guide using ESM
Stuck on Command/Event Handlers in discord.js guide using ESM

Time:08-04

I've been working through creating this bot using discord.js and I just can't for the life of me figure out how to use the command and event handler with ESM.

File is a CommonJS module; it may be converted to an ES module.ts(80001)

CodePudding user response:

if you want to use import in node,you must change the value of the typeoption in package.json to module

  • Related