fix: youtube playlists being undefined

This commit is contained in:
Snowflake107 2021-05-10 15:38:24 +05:45
parent 9e187a4d2b
commit c6830f87c0

View file

@ -290,6 +290,10 @@ export class Player extends EventEmitter {
// @ts-ignore
playlist.requestedBy = message.author;
Object.defineProperty(playlist, "tracks", {
get: () => playlist.videos ?? []
});
this.emit(PlayerEvents.PLAYLIST_PARSE_END, playlist, message);
// @ts-ignore