ZNomad
DIAdiscord.js - Imagine an app
•Created by ZNomad on 11/9/2023 in #djs-questions
can't receive event (no console message)
that looks like that
36 replies
DIAdiscord.js - Imagine an app
•Created by ZNomad on 11/9/2023 in #djs-questions
can't receive event (no console message)
looks fine to me
36 replies
DIAdiscord.js - Imagine an app
•Created by ZNomad on 11/9/2023 in #djs-questions
can't receive event (no console message)
k
36 replies
DIAdiscord.js - Imagine an app
•Created by ZNomad on 11/9/2023 in #djs-questions
can't receive event (no console message)
const eventsPath = path.join(__dirname, 'events');
const eventFiles = fs.readdirSync(eventsPath).filter(file => file.endsWith('.js'));
for (const file of eventFiles) {
const filePath = path.join(eventsPath, file);
const event = require(filePath);
if (event.once) {
client.once(event.name, (...args) => event.execute(...args));
} else {
client.on(event.name, (...args) => event.execute(...args));
}
}
36 replies
DIAdiscord.js - Imagine an app
•Created by ZNomad on 11/9/2023 in #djs-questions
can't receive event (no console message)
i have an event handler in index.js (i think)
36 replies
DIAdiscord.js - Imagine an app
•Created by ZNomad on 11/9/2023 in #djs-questions
can't receive event (no console message)
ohh
36 replies
DIAdiscord.js - Imagine an app
•Created by ZNomad on 11/9/2023 in #djs-questions
can't receive event (no console message)
no, just that one file
36 replies
DIAdiscord.js - Imagine an app
•Created by ZNomad on 11/9/2023 in #djs-questions
can't receive event (no console message)
userjoin.js
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,
],
});
client.on("guildMemberAdd", (member) => {
console.log(member)
})
36 replies
DIAdiscord.js - Imagine an app
•Created by ZNomad on 11/9/2023 in #djs-questions
can't receive event (no console message)
yeah
36 replies
DIAdiscord.js - Imagine an app
•Created by ZNomad on 11/9/2023 in #djs-questions
can't receive event (no console message)
no errors
36 replies
DIAdiscord.js - Imagine an app
•Created by ZNomad on 11/9/2023 in #djs-questions
can't receive event (no console message)
it does not show the console message, but everything else is fine
36 replies
DIAdiscord.js - Imagine an app
•Created by ZNomad on 11/9/2023 in #djs-questions
can't receive event (no console message)
yes and no
36 replies
DIAdiscord.js - Imagine an app
•Created by ZNomad on 11/9/2023 in #djs-questions
how can i welcome users?
thanks
10 replies
DIAdiscord.js - Imagine an app
•Created by ZNomad on 11/9/2023 in #djs-questions
how can i welcome users?
oh cool
10 replies
DIAdiscord.js - Imagine an app
•Created by ZNomad on 11/9/2023 in #djs-questions
how can i welcome users?
also how do i get "client" i have no idea how that works
10 replies
DIAdiscord.js - Imagine an app
•Created by ZNomad on 11/9/2023 in #djs-questions
how can i welcome users?
how would I do that? (also how do you get github badge)
10 replies