Discord bot Cannot read properties of undefined hatası

METE_Darkness

Picopat
Katılım
29 Eylül 2023
Mesajlar
5
Daha fazla  
Cinsiyet
Erkek
Discord bot bu hatayı aliyorum:

Kod:
Const Client = New Client({ intents: [Intents.FLAGS.GUILD_MESSAGES] });
 ^

Typeerror: Cannot read properties of undefined (reading 'flags')
 At object.<anonymous> (C:\Users\benbi\Desktop\dc bot\index.js:2:47)
 At module. _compile (node:internal/modules/cjs/loader:1376:14)
 At Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
 At module. Load (node:internal/modules/cjs/loader:1207:32)
 At module. _load (node:internal/modules/cjs/loader:1023:12)
 At function. Executeuserentrypoint [as runMain] (node:internal/modules/run_main:135:12)
 At node:internal/main/run_main_module:28:49
 
Son düzenleyen: Moderatör:
JavaScript:
const { Client, GatewayIntentBits } = require('discord.js')
const client = new Client({
    intents: [
        GatewayIntentBits.Guilds,
        GatewayIntentBits.GuildMessages,
        GatewayIntentBits.MessageContent,
    ]
})
 
Discord bot bu hatayı aliyorum:

Kod:
Const Client = New Client({ intents: [Intents.FLAGS.GUILD_MESSAGES] });
 ^

Typeerror: Cannot read properties of undefined (reading 'flags')
 At object.<anonymous> (C:\Users\benbi\Desktop\dc bot\index.js:2:47)
 At module. _compile (node:internal/modules/cjs/loader:1376:14)
 At Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
 At module. Load (node:internal/modules/cjs/loader:1207:32)
 At module. _load (node:internal/modules/cjs/loader:1023:12)
 At function. Executeuserentrypoint [as runMain] (node:internal/modules/run_main:135:12)
 At node:internal/main/run_main_module:28:49
JavaScript:
const Client = new Client({ intents: [Intents.FLAGS.GUILD_MESSAGES] });
Böyle değiştirin kodu.
 

Technopat Haberler

Geri
Yukarı