From ef5023b639ab3a897d428f3be7aff3d55a4365fd Mon Sep 17 00:00:00 2001 From: Essem Date: Tue, 9 Nov 2021 17:42:18 -0600 Subject: [PATCH] Made seek more precise, added notice to readme --- README.md | 2 +- commands/music/seek.js | 4 ++-- package.json | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b4da6a0..6e07b79 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ esmBot is an easily-extendable, multipurpose, and entertainment-focused Discord [![Top.gg](https://top.gg/api/widget/429305856241172480.svg)](https://top.gg/bot/429305856241172480) ## Usage -You can invite the bot to your server using this link: https://projectlounge.pw/invite +~~You can invite the bot to your server using this link: https://projectlounge.pw/invite~~ **The main instance of the bot is currently disabled by Discord with no explanation. Please use a self-hosted instance.** A command list can be found [here](https://projectlounge.pw/esmBot/help.html). diff --git a/commands/music/seek.js b/commands/music/seek.js index 489ac31..108c1ac 100644 --- a/commands/music/seek.js +++ b/commands/music/seek.js @@ -10,10 +10,10 @@ class SeekCommand extends MusicCommand { const player = this.connection.player; const track = await Rest.decode(player.node, player.track); if (!track.isSeekable) return "This track isn't seekable!"; - const seconds = parseInt(this.args[0]); + const seconds = parseFloat(this.args[0]); if (isNaN(seconds) || (seconds * 1000) > track.length || (seconds * 1000) < 0) return "That's not a valid position!"; player.seek(seconds * 1000); - return `🔊 Seeked track to ${seconds} seconds.`; + return `🔊 Seeked track to ${seconds} second(s).`; } static description = "Seeks to a different position in the music"; diff --git a/package.json b/package.json index d0c0730..1cb1993 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,8 @@ "build": "node-gyp configure build -j max", "docker:build": "docker build -t esmbot -f Dockerfile.bot .", "docker:build-api": "docker build -t esmbot-api -f Dockerfile.api .", - "docker:build-ss": "docker build -t headless-chrome-alpine --no-cache ./utils/screenshot", "docker:run-bot": "docker run --rm --network=host esmbot", "docker:run-api": "docker run --rm --network=host esmbot-api", - "docker:run-ss": "docker run --rm --network=host --shm-size=128m headless-chrome-alpine", "docker:run-lava": "docker run --rm --network host -v \"$(pwd)\"/application.yml:/opt/Lavalink/application.yml -v \"$(pwd)\"/assets:/opt/Lavalink/assets fredboat/lavalink:dev", "start": "node app.js" },