Skip to content

Commit

Permalink
Update DamonJsPlayer.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
achiragaming committed Dec 25, 2023
1 parent 0bdb2e3 commit e039ab7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Managers/DamonJsPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ export class DamonJsPlayer {
return this.emit(Events.Debug, this, `Player ${this.guildId} destroyed from end event`);

this.isTrackPlaying = false;
const lastTrack = this.queue[this.queue.lastId]
lastTrack && this.emit(Events.PlayerEnd, this, lastTrack);

const lastTrack = this.queue[this.queue.lastId];
if (lastTrack) this.emit(Events.PlayerEnd, this, lastTrack)


if (data.reason === 'replaced') return this.emit(Events.PlayerEmpty, this);

Expand Down

0 comments on commit e039ab7

Please sign in to comment.