chore(prettier): format code
This commit is contained in:
parent
8c61b88956
commit
d27b9f8180
2 changed files with 16 additions and 14 deletions
|
@ -260,7 +260,7 @@ class DiscordPlayer extends EventEmitter<PlayerEvents> {
|
||||||
return { playlist: playlist, tracks: playlist.tracks };
|
return { playlist: playlist, tracks: playlist.tracks };
|
||||||
}
|
}
|
||||||
case QueryType.SOUNDCLOUD_PLAYLIST: {
|
case QueryType.SOUNDCLOUD_PLAYLIST: {
|
||||||
const data = await SoundCloud.getPlaylist(query).catch(() => { });
|
const data = await SoundCloud.getPlaylist(query).catch(() => {});
|
||||||
if (!data) return { playlist: null, tracks: [] };
|
if (!data) return { playlist: null, tracks: [] };
|
||||||
|
|
||||||
const res = new Playlist(this, {
|
const res = new Playlist(this, {
|
||||||
|
@ -322,18 +322,20 @@ class DiscordPlayer extends EventEmitter<PlayerEvents> {
|
||||||
});
|
});
|
||||||
|
|
||||||
for (const video of ytpl) {
|
for (const video of ytpl) {
|
||||||
playlist.tracks.push(new Track(this, {
|
playlist.tracks.push(
|
||||||
title: video.title,
|
new Track(this, {
|
||||||
description: video.description,
|
title: video.title,
|
||||||
author: video.channel?.name,
|
description: video.description,
|
||||||
url: video.url,
|
author: video.channel?.name,
|
||||||
requestedBy: options.requestedBy,
|
url: video.url,
|
||||||
thumbnail: video.thumbnail?.displayThumbnailURL("maxresdefault"),
|
requestedBy: options.requestedBy,
|
||||||
views: video.views,
|
thumbnail: video.thumbnail?.displayThumbnailURL("maxresdefault"),
|
||||||
duration: video.durationFormatted,
|
views: video.views,
|
||||||
raw: video,
|
duration: video.durationFormatted,
|
||||||
playlist: playlist
|
raw: video,
|
||||||
}));
|
playlist: playlist
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -67,7 +67,7 @@ class Queue<T = unknown> {
|
||||||
this.connection.on("debug", (msg) => this.player.emit("debug", this, msg));
|
this.connection.on("debug", (msg) => this.player.emit("debug", this, msg));
|
||||||
|
|
||||||
this.player.emit("connectionCreate", this, this.connection);
|
this.player.emit("connectionCreate", this, this.connection);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue