public function fire()
{
$client = $this->client;
foreach ($this->game->getLivingPlayers() as $player) {
if (!strstr($this->chosenUserId, $player->getId())) {
continue;
}
if ($player->role->appearsAsWerewolf()) {
$msg = "@{$player->getUsername()} is on the side of the Werewolves.";
} else {
$msg = "@{$player->getUsername()} is on the side of the Villagers.";
}
$this->client->getDMById($this->channel)->then(function (DirectMessageChannel $dmc) use($client, $msg) {
$this->client->send($msg, $dmc);
});
$this->game->setSeerSeen(true);
$this->gameManager->changeGameState($this->game->getId(), GameState::DAY);
return;
}
$this->client->getDMById($this->channel)->then(function (DirectMessageChannel $dmc) use($client) {
$this->client->send("Could not find the user you asked for.", $dmc);
});
}