Discord botunda "SyntaxError: Invalid or unexpected token" hatası

468113

Decapat
Katılım
10 Haziran 2021
Mesajlar
281
Tüm botlarım hata vermeye başladı nedeni ne hata:
C:\Users\batuh\Desktop\SaTrAs\node_modules\discord.js\src\structures\interfaces\Application.js:1

SyntaxError: Invalid or unexpected token
[90m at wrapSafe (internal/modules/cjs/loader.js:988:16)[39m
[90m at Module._compile (internal/modules/cjs/loader.js:1036:27)[39m
[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)[39m
[90m at Module.load (internal/modules/cjs/loader.js:937:32)[39m
[90m at Function.Module._load (internal/modules/cjs/loader.js:778:12)[39m
[90m at Module.require (internal/modules/cjs/loader.js:961:19)[39m
[90m at require (internal/modules/cjs/helpers.js:92:18)[39m
at Object.<anonymous> (C:\Users\batuh\Desktop\SaTrAs\node_modules\[4mdiscord.js[24m\src\structures\IntegrationApplication.js:3:21)
[90m at Module._compile (internal/modules/cjs/loader.js:1072:14)[39m
[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)[39m
PS C:\Users\batuh\Desktop\SaTrAs>
 
Son düzenleyen: Moderatör:
Kodu atarmısın?



client.login('');
Kod:
const Discord = require('discord.js');
const client = new Discord.Client();

client.on('ready', () => { client.user.setActivity(`Satras Kendisinin Kral Olduğunu Hayal Ediyor`)
console.log(`Botun Olan ${client.user.tag}Sunucuya Giriş Yaptı`);
});
client.on('message', msg => {
if (msg.content.toLowerCase() === 'sa') {
msg.reply('AS');
}
if (msg.content.toLowerCase() === 'merhaba') {
msg.reply('MaRaBa');
}
if (msg.content.toLowerCase() === 'naber') {
msg.reply('İyidir Moruq Sen');
}
if (msg.content.toLowerCase() === 'rol') {
msg.reply('ROL ALMAK İÇİN GÜVENİMİZİ KAZANMAN GEREK ÖZEL ROL HER HAFTA ÇEKİLİŞLE VERİLECEK');
}
if (msg.content.toLowerCase() === 'bot') {
msg.reply('Sensin Lan Bot Noob Bana Bot Dersen Ağzını Burnunu Kırarım Senin Adam Ol Ayağını Denk Al 😠 Bana AbuzittinKıllıBacak Dicen Tamammı Gerizekalı');
}
if (msg.content.toLowerCase() === 'abuzittinkıllıbacak') {
msg.reply('Heh Şimdi Oldu Böyle Adam Olcan İşte');
}
if (msg.content.toLowerCase() === 'espri yap') {
msg.reply('Esprimi Yapam Peki Bigün Adam Yolda Yürürken Düşmüş Neden Çünkü Rüyadaymış (Rüya=Düş)EHÜEHÜEHÜEHÜÜÜÜÜ MÜQ ESPRİİİİİİ Sıradaki Espri Senin Bugün TONla İşin Var Ama kar-TON la ehüehüehüüüüüü');
}
if (msg.content.toLowerCase() === 'eğlence') {
msg.reply('Benle Eğlenemezsin Ben Sadece Yazdığın Şeylere Cevap Veren Basit Bir Botum Üzgünüm 😭');
}
if (msg.content.toLowerCase() === 'kitap öner') {
msg.reply('Cin Ali Sirke Gidiyor');
}
});


client.login('');
Beklet
Onayla
Sil
 
Kod:
C:\Users\batuh\Desktop\Bott\node_modules\discord.js\src\client\Client.js:544
      throw new TypeError('CLIENT_MISSING_INTENTS');
      ^

TypeError [CLIENT_MISSING_INTENTS]: Valid intents must be provided for the Client.
    at Client._validateOptions (C:\Users\batuh\Desktop\Bott\node_modules\[4mdiscord.js[24m\src\client\Client.js:544:13)
    at new Client (C:\Users\batuh\Desktop\Bott\node_modules\[4mdiscord.js[24m\src\client\Client.js:73:10)
    at Object.<anonymous> (C:\Users\batuh\Desktop\Bott\bot.js:2:16)
[90m    at Module._compile (node:internal/modules/cjs/loader:1101:14)[39m
[90m    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)[39m
[90m    at Module.load (node:internal/modules/cjs/loader:981:32)[39m
[90m    at Function.Module._load (node:internal/modules/cjs/loader:822:12)[39m
[90m    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)[39m
[90m    at node:internal/main/run_main_module:17:47[39m {
  [[32mSymbol(code)[39m]: [32m'CLIENT_MISSING_INTENTS'[39m
}
Şimdi de böyle hata alıyorum.
 
Uyarı! Bu konu 5 yıl önce açıldı.
Muhtemelen daha fazla tartışma gerekli değildir ki bu durumda yeni bir konu başlatmayı öneririz. Eğer yine de cevabınızın gerekli olduğunu düşünüyorsanız buna rağmen cevap verebilirsiniz.

Technopat Haberler

Yeni konular

Yeni mesajlar

Geri
Yukarı