Skip to content

Commit

Permalink
chore(Player): beautify
Browse files Browse the repository at this point in the history
  • Loading branch information
Fab1o0107 committed Dec 23, 2023
1 parent 925d697 commit dfbc1da
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/guild/Player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,8 @@ export class Player extends EventEmitter {
public async movePlayer(name?: string): Promise<boolean> {
const node = this.node.manager.nodes.get(name!) ?? this.node.manager.idealNode;

if (!node && ![...this.node.manager.nodes.values()].some(({ state }) => state === State.Connected)) {
if (!node && ![...this.node.manager.nodes.values()].some(({ state }) => state === State.Connected))
throw new Error("No available nodes to move to");
}
if (!node || node.name === this.node.name || node.state !== State.Connected) return false;

let lastNode = this.node.manager.nodes.get(this.node.name);
Expand Down Expand Up @@ -245,7 +244,7 @@ export class Player extends EventEmitter {
position: playable.options?.startTime,
endTime: playable.options?.endTime
},
noReplace: playable.options?.noReplace ?? false
noReplace: playable.options?.noReplace
});

this.trackIdentifier = player.track?.info.identifier ?? null;
Expand Down

0 comments on commit dfbc1da

Please sign in to comment.