#[Moved]
12 messages · Page 1 of 1 (latest)
- What's your exact discord.js
npm list discord.jsand nodenode -vversion? - 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
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.
I've discovered that it works if I put this program in a function and then run it but I don't know why
This is the output by the way.
this isn't djs related, use #1081585952654360687
move the question there and share what is on MessageCreate.ts
[Moved]