From 5f23a303ffbe83c6541fd91435cbf6da29fa34ed Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Fri, 19 Feb 2021 08:22:23 +0100 Subject: [PATCH] Revert ":sparkles: Add currentTime and totalTime options to progress bar" This reverts commit 5223a599ba16815521c93517bc2dede2314c1014. --- src/Player.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Player.js b/src/Player.js index b934269..38f01f9 100644 --- a/src/Player.js +++ b/src/Player.js @@ -1002,10 +1002,8 @@ class Player extends EventEmitter { /** * Create a progress bar for the queue of the server. * @param {Discord.Message} message - * @param {Object} [options] - * @param {boolean} [options.timecodes] Whether or not to show timecodes in the progress bar - * @param {number} [options.currentTime] - * @param {number} [options.totalTime] + * @param {Object} options + * @param {boolean} options.timecodes * @returns {string} */ createProgressBar (message, options) { @@ -1014,9 +1012,9 @@ class Player extends EventEmitter { if (!queue) return const timecodes = options && typeof options === 'object' ? options.timecodes : false // Stream time of the dispatcher - const currentStreamTime = options && typeof options.currentTime === 'number' ? options.currentTime : queue.currentStreamTime + const currentStreamTime = queue.currentStreamTime // Total stream time - const totalTime = options && typeof options.totalTime === 'number' ? options.totalTime : queue.playing.durationMS + const totalTime = queue.playing.durationMS // Stream progress const index = Math.round((currentStreamTime / totalTime) * 15) // conditions