Made seek more precise, added notice to readme
This commit is contained in:
parent
0aafe950f7
commit
ef5023b639
3 changed files with 3 additions and 5 deletions
|
@ -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).
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue