HananJ123
HananJ123
DIAdiscord.js - Imagine an app
Created by HananJ123 on 5/9/2024 in #djs-questions
Intents
GatewayIntentBits.Guilds,
^

TypeError: Cannot read properties of undefined (reading 'Guilds')
at Object.<anonymous> (H:\Bot Making\HE BOT V2\index.js:10:21)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49

Node.js v20.12.2
PS H:\Bot Making\HE BOT V2>
GatewayIntentBits.Guilds,
^

TypeError: Cannot read properties of undefined (reading 'Guilds')
at Object.<anonymous> (H:\Bot Making\HE BOT V2\index.js:10:21)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49

Node.js v20.12.2
PS H:\Bot Making\HE BOT V2>
Code:
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.Guild.VoiceState,
GatewayIntentBits.MessageReactions,
],
});
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.Guild.VoiceState,
GatewayIntentBits.MessageReactions,
],
});
28 replies
DIAdiscord.js - Imagine an app
Created by HananJ123 on 5/9/2024 in #djs-questions
How do i right that into V14
const client = new Client({
intents: [
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MESSAGES,
Intents.FLAGS.GUILD_MEMBERS,
Intents.FLAGS.GUILD_VOICE_STATES,
Intents.FLAGS.GUILD_MESSAGE_REACTIONS
]
});
const client = new Client({
intents: [
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MESSAGES,
Intents.FLAGS.GUILD_MEMBERS,
Intents.FLAGS.GUILD_VOICE_STATES,
Intents.FLAGS.GUILD_MESSAGE_REACTIONS
]
});
4 replies