Discord.JS TypeError:无法读取未定义的属性(读取“reduce”)

问题描述 投票:0回答:1

在 Discord.js 中使用任何交互时收到以下错误

Uncaught TypeError TypeError: Cannot read properties of undefined (reading 'reduce')
    at BaseInteraction (node_modules\discord.js\src\structures\BaseInteraction.js:106:43)
    at MessageComponentInteraction (node_modules\discord.js\src\structures\MessageComponentInteraction.js:17:5)
    at ButtonInteraction (node_modules\discord.js\src\structures\ButtonInteraction.js:9:1)
    at handle (node_modules\discord.js\src\client\actions\InteractionCreate.js:90:25)
    at module.exports (node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
    at handlePacket (node_modules\discord.js\src\client\websocket\WebSocketManager.js:355:31)
    at <anonymous> (node_modules\discord.js\src\client\websocket\WebSocketManager.js:239:12)
    at emit (node_modules\@vladfrangu\async_event_emitter\dist\index.cjs:282:31)
    at <anonymous> (node_modules\@discordjs\ws\dist\index.js:1190:51)
    at emit (node_modules\@vladfrangu\async_event_emitter\dist\index.cjs:282:31)
    at onMessage (node_modules\@discordjs\ws\dist\index.js:1005:14)
    at processTicksAndRejections (internal/process/task_queues:95:5)
node.js discord.js
1个回答
0
投票

这是由 Discord API 最近的重大更改引起的。当前的解决方案是将 Discord.js 降级到 14.14.1

关注此 Discord.JS GitHub 问题以获取更多信息

© www.soinside.com 2019 - 2024. All rights reserved.