Skip to content

Commit

Permalink
+ Add next command
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill Kholodilin committed Nov 10, 2016
1 parent 9fbeabc commit a82caf0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/Chrl/AppBundle/GameAction/NextAction.php
Expand Up @@ -6,15 +6,15 @@ class NextAction extends BaseGameAction implements GameActionInterface
{
public function run($message, $user)
{
$game = $this->gameService->findGame($message);
$game = $this->gameService->findGame($message);

$this->botApi->sendMessage(
$game->chatId,
'Ok, changing question.',
'markdown'
);
$this->gameService->em->persist($game);
$this->gameService->em->flush();
$this->gameService->askQuestion($game);
$this->botApi->sendMessage(
$game->chatId,
'Ok, changing question.',
'markdown'
);
$this->gameService->em->persist($game);
$this->gameService->em->flush();
$this->gameService->askQuestion($game);
}
}

0 comments on commit a82caf0

Please sign in to comment.