prettier
This commit is contained in:
parent
9b5747216e
commit
9fcf9a86d8
1 changed files with 6 additions and 3 deletions
|
@ -361,11 +361,14 @@ class Queue<T = unknown> {
|
||||||
if (this.options.leaveOnEnd) this.destroy();
|
if (this.options.leaveOnEnd) this.destroy();
|
||||||
return void this.player.emit("queueEnd", this);
|
return void this.player.emit("queueEnd", this);
|
||||||
}
|
}
|
||||||
const info = await ytdl.getInfo(track.url).then(x => x.related_videos[0]).catch(() => {});
|
const info = await ytdl
|
||||||
|
.getInfo(track.url)
|
||||||
|
.then((x) => x.related_videos[0])
|
||||||
|
.catch(() => {});
|
||||||
if (!info) {
|
if (!info) {
|
||||||
if (this.options.leaveOnEnd) this.destroy();
|
if (this.options.leaveOnEnd) this.destroy();
|
||||||
return void this.player.emit("queueEnd", this);
|
return void this.player.emit("queueEnd", this);
|
||||||
};
|
}
|
||||||
|
|
||||||
const nextTrack = new Track(this.player, {
|
const nextTrack = new Track(this.player, {
|
||||||
title: info.title,
|
title: info.title,
|
||||||
|
|
Loading…
Reference in a new issue