N/A
N/A
DIAdiscord.js - Imagine an app
Created by N/A on 10/27/2024 in #djs-questions
[Moved]
👎
12 replies
DIAdiscord.js - Imagine an app
Created by N/A on 10/27/2024 in #djs-questions
[Moved]
No description
12 replies
DIAdiscord.js - Imagine an app
Created by N/A on 10/27/2024 in #djs-questions
[Moved]
I've discovered that it works if I put this program in a function and then run it but I don't know why
12 replies
DIAdiscord.js - Imagine an app
Created by N/A on 10/27/2024 in #djs-questions
[Moved]
I'm literally not doing anything else except trying to log "Commands" too, which is really confusing.
12 replies
DIAdiscord.js - Imagine an app
Created by N/A on 10/27/2024 in #djs-questions
[Moved]
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
import { Commands } from "../main.ts"; // Import the Commands map
12 replies
DIAdiscord.js - Imagine an app
Created by N/A on 10/27/2024 in #djs-questions
[Moved]
And, when it tries to load "MessageCreate.ts", it completely stops.
12 replies
DIAdiscord.js - Imagine an app
Created by N/A on 10/27/2024 in #djs-questions
[Moved]
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}'`);
}
// 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}'`);
}
12 replies
DIAdiscord.js - Imagine an app
Created by N/A on 10/27/2024 in #djs-questions
[Moved]
So, this is my code so far
12 replies