【问题标题】:Typeerror: Cannot read property 'get' of undefined. (making a music bot)类型错误:无法读取未定义的属性“获取”。 (制作音乐机器人)
【发布时间】:2021-03-01 00:28:12
【问题描述】:

我正在尝试制作一个音乐机器人。这是有错误的代码。

const serverQueue = message.client.queue.get(message.guild.id);

【问题讨论】:

  • 我们需要消息对象中的值来找出问题所在。但从错误消息来看,queue 的值似乎是未定义的。

标签: node.js promise get discord.js


【解决方案1】:

Client.queue 在 discord.js 中不存在。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-12-13
    • 2020-12-10
    • 2021-10-08
    • 2016-08-28
    • 2021-12-22
    • 1970-01-01
    • 2021-12-25
    • 2020-10-28
    相关资源
    最近更新 更多