diff --git a/src/modules/music.js b/src/modules/music.js index 2dc7d34..20ffeaa 100644 --- a/src/modules/music.js +++ b/src/modules/music.js @@ -359,9 +359,7 @@ async function enqueue({ return; } - console.log(media); const resource = createAudioResource(media.stream, {inputType: media.type}); - console.log(resource); connection.player.play(resource); textChannel.createMessage({ @@ -649,10 +647,10 @@ command.callback = async function ( const position = Date.now() - nowPlaying.start; - const timeEnd = formatTime(nowPlaying.length); + const timeEnd = nowPlaying.length == 0 ? "\u221e" : formatTime(nowPlaying.length); const timePos = formatTime(position); - const progress = position / nowPlaying.length; + const progress = nowPlaying.length == 0 ? 1 : position / nowPlaying.length; const barLength = Math.round(progress * NOWPLAYING_BAR_LENGTH); const bar = `\`[${"=".repeat(barLength)}${" ".repeat(