我正在尝试用 制作一个discord.js音乐机器人ytdl-core。我不太确定如何在使用命令时查找歌曲中的当前时间,并且搜索帮助并没有真正起到多大作用。该命令的工作方式如下!seek 1:30。
我想要了解的是:
a) 调度程序是否包含查找功能?
//i.e like below
let ms = 90000; //would be converted from arguments
queue.connection.dispatcher.seek(ms) //Does this exist???
Run Code Online (Sandbox Code Playgroud)
或 b) 如何在特定时间开始播放歌曲?
//Add the song again, but with a timestamp, and end current song
let seekedSong = queue.songs[0];
seekedSong.startTime = 90000;
queue.songs.unshift(seekedSong);
queue.connection.dispatcher.end()
/* However, how do I start a song given a start time?
*
* In my play.js file, which plays the next song in the queue automatically,
* …Run Code Online (Sandbox Code Playgroud)