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