diff --git a/package.json b/package.json index 6d6743447..04876a389 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "./dist/*": "./dist/*" }, "scripts": { - "dev": "cd example/test && ts-node index.ts", + "dev": "cd examples/test && ts-node index.ts", "build": "rimraf dist && tsc && npm run build:esm", "build:check": "tsc --noEmit --incremental false", "prepublishOnly": "rollup-type-bundler -e stream", diff --git a/src/Structures/Queue.ts b/src/Structures/Queue.ts index 52a6802c0..bf39f4a23 100644 --- a/src/Structures/Queue.ts +++ b/src/Structures/Queue.ts @@ -455,16 +455,13 @@ class Queue { */ shuffle() { if (this.#watchDestroyed()) return; - if (!this.tracks.length || this.tracks.length < 3) return false; - const currentTrack = this.tracks.shift(); + if (!this.tracks.length || this.tracks.length < 2) return false; for (let i = this.tracks.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1)); [this.tracks[i], this.tracks[j]] = [this.tracks[j], this.tracks[i]]; } - this.tracks.unshift(currentTrack); - return true; }