Suspicious Man
Suspicious Man
DIAdiscord.js - Imagine an app
Created by Suspicious Man on 7/13/2023 in #djs-questions
client is not defined in interactionCreate.js, but it is defined in main.js
113 replies
DIAdiscord.js - Imagine an app
Created by Suspicious Man on 7/13/2023 in #djs-questions
I tried to repeat the "Registering slash commands" page on discord.js guide
7 replies
DIAdiscord.js - Imagine an app
Created by Suspicious Man on 7/13/2023 in #djs-questions
So, i tried to repeat the Registering slash commands page from djs guide website
8 replies
DIAdiscord.js - Imagine an app
Created by Suspicious Man on 7/12/2023 in #djs-questions
Getting an error when im trying to node main.js
The code const { Client, Intents } = require('discord.js'); const { token: token } = require('./config.json'); const client = new Client({ intents: [Intents.FLAGS.guilds] }); client.once('ready', () => { console.log('Ready!'); }); client.login(token); The error C:\Users\User\Desktop\Discord Bot\main.js:3 const client = new Client({ intents: [Intents.FLAGS.guilds] }); ^ TypeError: Cannot read properties of undefined (reading 'FLAGS') at Object.<anonymous> (C:\Users\User\Desktop\Discord Bot\main.js:3:47) at Module._compile (node:internal/modules/cjs/loader:1256:14) at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) at Module.load (node:internal/modules/cjs/loader:1119:32) at Module._load (node:internal/modules/cjs/loader:960:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47 Node.js v18.16.1
11 replies