prettier
This commit is contained in:
parent
9b5747216e
commit
9fcf9a86d8
1 changed files with 6 additions and 3 deletions
|
@ -258,7 +258,7 @@ class Queue<T = unknown> {
|
||||||
if (!this.playing || !this.current) return false;
|
if (!this.playing || !this.current) return false;
|
||||||
if (position < 1) position = 0;
|
if (position < 1) position = 0;
|
||||||
if (position >= this.current.durationMS) return this.skip();
|
if (position >= this.current.durationMS) return this.skip();
|
||||||
|
|
||||||
await this.play(this.current, {
|
await this.play(this.current, {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
filtersUpdate: true, // to stop events
|
filtersUpdate: true, // to stop events
|
||||||
|
@ -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