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; }