Вот так вроде нормальный автоплей
This commit is contained in:
JonnyBro 2022-09-13 22:17:43 +05:00
parent b97bbd29bd
commit 8729886d64
2 changed files with 2 additions and 2 deletions

View file

@ -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",

View file

@ -697,7 +697,7 @@ class Queue<T = unknown> {
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,