From d27b9f818060bf018bd1fe8fb944aa4b3017041d Mon Sep 17 00:00:00 2001 From: Snowflake107 Date: Mon, 14 Jun 2021 12:30:03 +0545 Subject: [PATCH] chore(prettier): format code --- src/Player.ts | 28 +++++++++++++++------------- src/Structures/Queue.ts | 2 +- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/Player.ts b/src/Player.ts index a9fb2b3..05342d7 100644 --- a/src/Player.ts +++ b/src/Player.ts @@ -260,7 +260,7 @@ class DiscordPlayer extends EventEmitter { return { playlist: playlist, tracks: playlist.tracks }; } case QueryType.SOUNDCLOUD_PLAYLIST: { - const data = await SoundCloud.getPlaylist(query).catch(() => { }); + const data = await SoundCloud.getPlaylist(query).catch(() => {}); if (!data) return { playlist: null, tracks: [] }; const res = new Playlist(this, { @@ -322,18 +322,20 @@ class DiscordPlayer extends EventEmitter { }); for (const video of ytpl) { - playlist.tracks.push(new Track(this, { - title: video.title, - description: video.description, - author: video.channel?.name, - url: video.url, - requestedBy: options.requestedBy, - thumbnail: video.thumbnail?.displayThumbnailURL("maxresdefault"), - views: video.views, - duration: video.durationFormatted, - raw: video, - playlist: playlist - })); + playlist.tracks.push( + new Track(this, { + title: video.title, + description: video.description, + author: video.channel?.name, + url: video.url, + requestedBy: options.requestedBy, + thumbnail: video.thumbnail?.displayThumbnailURL("maxresdefault"), + views: video.views, + duration: video.durationFormatted, + raw: video, + playlist: playlist + }) + ); } } default: diff --git a/src/Structures/Queue.ts b/src/Structures/Queue.ts index bb34ff4..149ab95 100644 --- a/src/Structures/Queue.ts +++ b/src/Structures/Queue.ts @@ -67,7 +67,7 @@ class Queue { this.connection.on("debug", (msg) => this.player.emit("debug", this, msg)); this.player.emit("connectionCreate", this, this.connection); - + return this; }