Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
achiragaming committed Feb 25, 2024
1 parent 1db5a25 commit db36385
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "damonjs",
"version": "1.6.7",
"version": "1.6.8",
"preview": false,
"description": "A modified Shoukaku wrapper with enhanced queue support.",
"main": "dist/Index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/Index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export * from './DamonJs';
export { DamonJsTrack, DamonJsQueue, DamonJsPlayer, Plugins };
export * from './Modules/Interfaces';

export const version = '1.6.7';
export const version = '1.6.8';
6 changes: 3 additions & 3 deletions src/Managers/DamonJsPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ export class DamonJsPlayer {

private initEventListeners() {
const eventHandlers = {
start: () => {
start: async () => {
if (!this.queue.current) return this.emit(Events.Debug, this, `No track to start ${this.guildId}`);
this.isTrackPlaying = true;
this.player.paused = false;
this.emit(Events.PlayerStart, this, this.queue.current);
},
end: (data: TrackEndEvent) => {
end: async (data: TrackEndEvent) => {
if (this.state === PlayerState.DESTROYING || this.state === PlayerState.DESTROYED) {
return this.emit(Events.Debug, this, `Player ${this.guildId} destroyed from end event`);
}
Expand All @@ -97,7 +97,7 @@ export class DamonJsPlayer {
if (data.reason === 'replaced') {
return this.emit(Events.PlayerEmpty, this);
}
this.handleTrackEnd(data);
await this.handleTrackEnd(data);
},
closed: async (data: WebSocketClosedEvent) => {
this.emit(Events.PlayerClosed, this, data);
Expand Down

0 comments on commit db36385

Please sign in to comment.