无法恢复可读流 nodejs

问题描述

我正在尝试制作一个播放音乐的不和谐机器人。为了播放音乐,我使用了使用 ytdl-core 获得的可读流。我可以使用 .pause() 方法毫无问题地暂停它,但是在使用 .resume() 之后似乎没有任何效果。这是我用于简历功能代码

module.exports.run =async (client,channel,authorID,args) => {
    const ServerInfos = require("../ServerInfos").ServerInfos
    return new Promise(function (resolve,reject){
        for (let i=0;i<ServerInfos.length;i++){
            if (ServerInfos[i].ID==channel.guild.id && ServerInfos[i].AudioStream != null){
                console.log(ServerInfos[i].AudioStream)
                ServerInfos[i].AudioStream.resume()
                resolve("Music resumed")
            };
        };
    })
};
module.exports.help = {
    name: 'resume',description:'resumes the music',options:[]
};

在此先感谢您的帮助:)

解决方法

我能够通过将 nodejs 降级到 12.x 来解决这个问题