Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Commit

Permalink
Update: Spectators are ignored.
Browse files Browse the repository at this point in the history
  • Loading branch information
jftanner committed Oct 23, 2020
1 parent 12ed6cb commit 604b01b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions classes/Player.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,15 @@ class Player {
async setForIntermission() {
// Everyone is alive again at intermission.
this.status = STATUS.LIVING;

// Spectators aren't modified
if (this.isSpectating) return;
await this.editGuildMember(false, false, "Intermission");
}

async setForWorking() {
// Spectators are muted during the game.
if (this.isSpectating) return this.editGuildMember(true, false, "Spectator");
// Spectators aren't modified.
if (this.isSpectating) return;

// Set audio permissions based on working status.
this.isWorker
Expand All @@ -158,8 +161,8 @@ class Player {
}

async setForMeeting() {
// Spectators are muted during the game.
if (this.isSpectating) return this.editGuildMember(true, false, "Spectator");
// Spectators aren't modified
if (this.isSpectating) return;

// At the start of meetings, dying players become dead.
if (this.status === STATUS.DYING) this.status = STATUS.DEAD;
Expand Down

0 comments on commit 604b01b

Please sign in to comment.