Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function execute()
- {
- ...
- $conversation = new Conversation($user_id, $chat_id, $this->getName());
- if ($text === '') {
- $data['text'] = 'Пока нет отзывов о работе нашего магазина. После покупки Вы сможете оставить первый!'
- return Request::sendMessage($data);
- }
- /**
- * Navigation
- */
- if ($text === '🛒 Магазин'){
- $update['message']['text'] = '/shop';
- $result = (new ShopCommand($this->telegram, new Update($update)))->preExecute();
- }
- elseif ($text === '💰 Мой баланс') {
- $update['message']['text'] = '/balance';
- $result = (new BalanceCommand($this->telegram, new Update($update)))->preExecute();
- }
- elseif ($text === '🛍 Мои покупки') {
- $update['message']['text'] = '/orders';
- $result = (new OrdersCommand($this->telegram, new Update($update)))->preExecute();
- }
- elseif ($text === '👥 Партнёрская программа') {
- $update['message']['text'] = '/partners';
- $result = (new PartnersCommand($this->telegram, new Update($update)))->preExecute();
- }
- elseif ($this->getTelegram()->isAdmin() && $text === '🔒 Админ-панель') {
- $update['message']['text'] = '/panel';
- $result = (new PanelCommand($this->telegram, new Update($update)))->preExecute();
- }
- // $conversation->stop();
- return $result; // HERE
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement