AutiCodes
Explore posts from serversDIAdiscord.js - Imagine an app
•Created by AutiCodes on 8/12/2023 in #djs-questions
Cannot read properties of undefined (reading 'Client')
Hi, so i need to add intents to my basic bot. Now it cant read
Client
anymore when i do this, does anyone sees where it goes wrong?
``ts
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,
],
});
client.on("ready", () => {
console.log(
Logged in as ${client.user.tag}!`)
})
client.on("message", msg => {
if (msg.content === "ping") {
msg.reply("pong");
}
})
Client.login('tokenHere')22 replies
DIAdiscord.js - Imagine an app
•Created by AutiCodes on 4/24/2023 in #djs-questions
Error: ENOTDIR: not a directory, scandir 'C:\Users\k_der\developing\JS\bots\commands\ping.js'
Hi, so i'm making my first bot in JS. Now i want to deploy the slash commands inside the DIR
commands
. But it gives the error "Error: ENOTDIR: not a directory, scandir 'C:\Users\k_der\developing\JS\bots\commands\ping.js'" When i'm running deploy-commands.js
.
Who can help me?
Script i use:
33 replies