From 75be67a18b41cea03d9edb0995fecf89cb476f2f Mon Sep 17 00:00:00 2001 From: MatteZ02 <47610069+MatteZ02@users.noreply.github.com> Date: Sun, 19 Jul 2020 14:16:04 +0300 Subject: [PATCH] Chore update 3.10.1 --- package.json | 2 +- src/commands/seek.js | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 4e2e39d1..bb0b2ffc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "musix", - "version": "3.10.0", + "version": "3.10.1", "description": "V3 for Musix the discord music bot", "main": "./index.js", "scripts": { diff --git a/src/commands/seek.js b/src/commands/seek.js index e091e64b..71da4b08 100644 --- a/src/commands/seek.js +++ b/src/commands/seek.js @@ -21,12 +21,15 @@ module.exports = { if (isNaN(pos)) { if (pos < 0) return msg.channel.send(client.messages.seekingPointPositive); + const totalLength = parseInt(queue.songs[0].info.lengthSeconds); let message; - message = client.messages.seekMax.replace( - "%LENGTH%", - queue.songs[0].info.lengthSeconds - ); - if (pos > queue.songs[0].info.lengthSeconds) return msg.channel.send(message); + if (pos > totalLength) { + message = client.messages.seekMax.replace( + "%LENGTH%", + queue.songs[0].info.lengthSeconds + ); + return msg.channel.send(message); + } } client.funcs.end(client, msg, pos, command); }