Advertisement
MyZik

Untitled

Jan 29th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.63 KB | None | 0 0
  1. public function execute()
  2.     {
  3.         ...
  4.  
  5.         $conversation = new Conversation($user_id, $chat_id, $this->getName());
  6.  
  7.         if ($text === '') {
  8.             $data['text'] = 'Пока нет отзывов о работе нашего магазина. После покупки Вы сможете оставить первый!'
  9.  
  10.             return Request::sendMessage($data);
  11.         }
  12.  
  13.         /**
  14.          * Navigation
  15.          */
  16.         if ($text === '🛒 Магазин'){
  17.             $update['message']['text'] = '/shop';
  18.             $result = (new ShopCommand($this->telegram, new Update($update)))->preExecute();
  19.         }
  20.         elseif ($text === '💰 Мой баланс') {
  21.             $update['message']['text'] = '/balance';
  22.             $result = (new BalanceCommand($this->telegram, new Update($update)))->preExecute();
  23.         }
  24.         elseif ($text === '🛍 Мои покупки') {
  25.             $update['message']['text'] = '/orders';
  26.             $result = (new OrdersCommand($this->telegram, new Update($update)))->preExecute();
  27.         }
  28.         elseif ($text === '👥 Партнёрская программа') {
  29.             $update['message']['text'] = '/partners';
  30.             $result = (new PartnersCommand($this->telegram, new Update($update)))->preExecute();
  31.         }
  32.         elseif ($this->getTelegram()->isAdmin() && $text === '🔒 Админ-панель') {
  33.             $update['message']['text'] = '/panel';
  34.             $result = (new PanelCommand($this->telegram, new Update($update)))->preExecute();
  35.         }
  36.  
  37. //        $conversation->stop();
  38.         return $result; // HERE
  39.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement