format() public static method

public static format ( Game $game ) : string
$game Slackwolf\Game\Game
return string
示例#1
0
 /**
  * {@inheritdoc}
  */
 public function fire()
 {
     $client = $this->client;
     if (!$this->gameManager->hasGame($this->channel)) {
         $client->getChannelGroupOrDMByID($this->channel)->then(function (ChannelInterface $channel) use($client) {
             $client->send(":warning: Run this command in the game channel.", $channel);
         });
         return;
     }
     // get status formatter
     $statusMsg = GameStatusFormatter::format($this->game);
     $this->gameManager->sendMessageToChannel($this->game, $statusMsg);
 }