0
const { YTSearcher } = require('ytsearcher');
 
const searcher = new YTSearcher({
    key: config.YOUTUBE_API_KEY,
    revealed: true
});

let result = await searcher.search(args.join(" "), { type: "video" })

            var songInfo = await ytdl.getInfo(result.first.url)
            var song = {
                title: songInfo.videoDetails.title,
                url: songInfo.videoDetails.video_url
            };

我正在使用 ytdl-core 使用不和谐机器人播放音乐,当我尝试播放歌曲时,它会发送错误“无法读取未定义的属性 'url'”

4

0 回答 0