emit playlistAdd when queue is empty

This commit is contained in:
Snowflake107 2021-04-30 21:43:30 +05:45
parent 211abefe77
commit 6548c966f2

View file

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