无法让 YTDL-core 与 discord.js 一起工作

Cannot get YTDL-core to work with discord.js

代码位于:https://github.com/Zentrik/DiscordBot/blob/master/Bot.js

我要么得到错误:

 server.queue.push(args[1]);
                  ^

TypeError: Cannot read property 'queue' of undefined
    at Client.<anonymous> (/home/ubuntu/discordbot/bot.js:133:19)
    at emitOne (events.js:115:13)
    at Client.emit (events.js:210:7)
    at MessageCreateHandler.handle (/home/ubuntu/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)
    at WebSocketPacketManager.handle (/home/ubuntu/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:103:65)
    at WebSocketConnection.onPacket (/home/ubuntu/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:330:35)
    at WebSocketConnection.onMessage (/home/ubuntu/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:293:17)
    at WebSocket.onMessage (/home/ubuntu/node_modules/ws/lib/EventTarget.js:99:16)
    at emitOne (events.js:115:13)
    at WebSocket.emit (events.js:210:7)

或者:

(node:8565) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'push' of undefined
(node:8565) [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.

我从这里得到了这段代码:https://www.youtube.com/watch?v=z4S2qqX7YvA

我很确定代码是一样的。

机器人加入语音频道,有权限加入和发言

我是 javascript 的新手,所以我不知道出了什么问题任何帮助将不胜感激

编辑:有一个拼写错误,我修正了它,但现在音频在开始后立即结束,没有声音产生。

服务器[message.guild.id]是[object Object]

server.queue[0] 与 url 相同,但后来将 'undefined' 添加到 url.

的末尾

server.dispatcher 也是 [object Object]

代码没有问题,在其他机器上也能正常运行,感谢您的帮助。 FFMPEG 不适用于更新的 debian 系统,而是 sudo apt-get install libav-tools -y