Discord.js ile bot yazarken hata

Humbuss

Centipat
Katılım
6 Mayıs 2020
Mesajlar
85
Kod:
node:12776) UnhandledPromiseRejectionWarning: TypeError: client.guilds.reduce is not a function

    at module.exports (C:\Users\osman\Downloads\app\events\ready.js:33:175)

    at Client.<anonymous> (C:\Users\osman\Downloads\app\util\eventLoader.js:3:45)

    at Client.emit (events.js:315:20)

    at WebSocketManager.triggerClientReady (C:\Users\osman\Downloads\app\node_modules\discord.js\src\client\websocket\WebSocketManager.js:431:17)

    at WebSocketManager.checkShardsReady (C:\Users\osman\Downloads\app\node_modules\discord.js\src\client\websocket\WebSocketManager.js:415:10)

    at WebSocketShard.<anonymous> (C:\Users\osman\Downloads\app\node_modules\discord.js\src\client\websocket\WebSocketManager.js:197:14)

    at WebSocketShard.emit (events.js:315:20)

    at WebSocketShard.checkReady (C:\Users\osman\Downloads\app\node_modules\discord.js\src\client\websocket\WebSocketShard.js:475:12)

    at WebSocketShard.onPacket (C:\Users\osman\Downloads\app\node_modules\discord.js\src\client\websocket\WebSocketShard.js:447:16)

    at WebSocketShard.onMessage (C:\Users\osman\Downloads\app\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)

(Use `node --trace-warnings ...` to show where the warning was created)

(node:12776) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see Command-line options | Node.js v15.8.0 Documentation). (rejection id: 1)

(node:12776) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
 
Son düzenleyen: Moderatör:
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

Geri
Yukarı