fix repeat mode

This commit is contained in:
KGT1 2020-10-06 00:41:04 +02:00
parent 76ef7d1e3e
commit 0b861cc2ca

View File

@ -54,7 +54,7 @@ function startPlaying (voiceconnection = discordclientmanager.getDiscordClient()
getAudioDispatcher().on("finish", () => {
if(isRepeat){
startPlaying(voiceconnection,itemIDPlaylist,currentPlayingPlaylistIndex,0)
startPlaying(voiceconnection,undefined,currentPlayingPlaylistIndex,0)
}else{
if (currentPlayingPlaylist.length < playlistIndex) {
if (disconnectOnFinish) {
@ -63,7 +63,7 @@ function startPlaying (voiceconnection = discordclientmanager.getDiscordClient()
stop(undefined, currentPlayingPlaylist[playlistIndex - 1]);
}
} else {
startPlaying(voiceconnection, itemIDPlaylist, currentPlayingPlaylistIndex + 1, 0);
startPlaying(voiceconnection, undefined, currentPlayingPlaylistIndex + 1, 0);
}}
});
}