Skip to content

Commit

Permalink
refactor(Player): make if operator for VoiceConnection on resumePlayer
Browse files Browse the repository at this point in the history
  • Loading branch information
Fab1o0107 committed Dec 26, 2023
1 parent c6412bf commit 3c65139
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/guild/Player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ export class Player extends EventEmitter {
* @internal
*/
public async resumePlayer(): Promise<void> {
await this.node.rest.updatePlayer({
const { state } = await this.node.rest.updatePlayer({
guildId: this.guildId,
playerOptions: {
track: { encoded: this._encodedTrack },
Expand All @@ -437,7 +437,7 @@ export class Player extends EventEmitter {
}
});

this.connection.sendVoiceUpdate();
if (!state.connected) this.connection.sendVoiceUpdate();
}

/**
Expand Down

0 comments on commit 3c65139

Please sign in to comment.