From 6548c966f25e361b0dee8261dfbbea31b913c3ba Mon Sep 17 00:00:00 2001 From: Snowflake107 Date: Fri, 30 Apr 2021 21:43:30 +0545 Subject: [PATCH] emit playlistAdd when queue is empty --- src/Player.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Player.ts b/src/Player.ts index a46af6e..bb32690 100644 --- a/src/Player.ts +++ b/src/Player.ts @@ -269,6 +269,7 @@ export class Player extends EventEmitter { const queue = (await this._createQueue(message, track).catch( (e) => void this.emit(PlayerEvents.ERROR, e, message) )) as Queue; + this.emit(PlayerEvents.PLAYLIST_ADD, message, queue, playlist); this.emit(PlayerEvents.TRACK_START, message, queue.tracks[0], queue); this._addTracksToQueue(message, tracks); }