From 8729886d6489a4da1de84d0b54e1fd903c59bb94 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Tue, 13 Sep 2022 22:17:43 +0500 Subject: [PATCH] =?UTF-8?q?v5.3.6=20=D0=92=D0=BE=D1=82=20=D1=82=D0=B0?= =?UTF-8?q?=D0=BA=20=D0=B2=D1=80=D0=BE=D0=B4=D0=B5=20=D0=BD=D0=BE=D1=80?= =?UTF-8?q?=D0=BC=D0=B0=D0=BB=D1=8C=D0=BD=D1=8B=D0=B9=20=D0=B0=D0=B2=D1=82?= =?UTF-8?q?=D0=BE=D0=BF=D0=BB=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/Structures/Queue.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ad7f30a..2c88884 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "discord-player-play-dl", - "version": "5.3.5", + "version": "5.3.6", "description": "Complete framework to facilitate music commands using discord.js and play-dl", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/Structures/Queue.ts b/src/Structures/Queue.ts index 5fd12bd..1facbd6 100644 --- a/src/Structures/Queue.ts +++ b/src/Structures/Queue.ts @@ -697,7 +697,7 @@ class Queue { return void this.player.emit("queueEnd", this); } - const related = await play.video_info(info.related_videos[Math.random()]); + const related = await play.video_info(info.related_videos[Math.floor(Math.random() * (info.related_videos.length - 1))]); const nextTrack = new Track(this.player, { title: related.video_details.title, url: related.video_details.url,