#[Moved]

12 messages · Page 1 of 1 (latest)

quartz mica
#

It's as the title says. I've been trying to solve this problem for hours and I just don't understand it.

unique edgeBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
  • Marked as resolved by staff
quartz mica
#

So, this is my code so far

#

I use this to load all of my events

// Load events
const eventFiles = Deno.readDirSync("./events");
for (const file of eventFiles) {
  const event = await import(`./events/${file.name}`);
  const module: Event<any> = event.default;

  if (module.once) {
    client.once(module.name, (...args) => module.execute(...args));
  } else {
    client.on(module.name, (...args) => module.execute(...args));
  }
  console.log(`Loaded event: '${module.name}'`);
}
#

And, when it tries to load "MessageCreate.ts", it completely stops.

#

For reference, all the other file (MessageCreate.ts) does, is try to print Commands via console.log(); , and this is how I import said Commands map.

import { Commands } from "../main.ts"; // Import the Commands map
#

I'm literally not doing anything else except trying to log "Commands" too, which is really confusing.

quartz mica
#

This is the output by the way.

little mist
#

this isn't djs related, use #1081585952654360687

#

move the question there and share what is on MessageCreate.ts

quartz mica
#

[Moved]