Exemple #1
0
 /**
  * @param string $message
  * @param string $destinationId
  */
 protected function sendMessageByDestId($message, $destinationId)
 {
     $this->client->getChannelGroupOrDMByID($destinationId)->then(function (ChannelInterface $channel) use($message) {
         $this->client->send($message, $channel);
     });
 }
 /**
  * Sends a message to a game.
  *
  * @param Game $game
  *   The game to send the message.
  *
  * @param $msg
  *   The message.
  */
 public function sendMessageToChannel($game, $msg)
 {
     $this->client->getChannelGroupOrDMByID($game->getId())->then(function (ChannelInterface $channel) use($msg) {
         $this->client->send($msg, $channel);
     });
 }