Funny Math.random

This commit is contained in:
JonnyBro 2022-09-13 21:47:19 +05:00
parent f863b2147c
commit d7b24db7c2

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.floor(Math.random() * info.related_videos.length + 1)]);
const related = await play.video_info(info.related_videos[Math.random()]);
const nextTrack = new Track(this.player, {
title: related.video_details.title,
url: related.video_details.url,