1 | <?php |
||
25 | class CancelCommand extends UserCommand |
||
26 | { |
||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $name = 'cancel'; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $description = 'Cancel the currently active conversation'; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | */ |
||
40 | protected $usage = '/cancel'; |
||
41 | |||
42 | /** |
||
43 | * @var string |
||
44 | */ |
||
45 | protected $version = '0.2.0'; |
||
46 | |||
47 | /** |
||
48 | * @var bool |
||
49 | */ |
||
50 | protected $need_mysql = true; |
||
51 | |||
52 | /** |
||
53 | * Command execute method |
||
54 | * |
||
55 | * @return \Longman\TelegramBot\Entities\ServerResponse |
||
56 | * @throws \Longman\TelegramBot\Exception\TelegramException |
||
57 | */ |
||
58 | public function execute() |
||
75 | |||
76 | /** |
||
77 | * Remove the keyboard and output a text |
||
78 | * |
||
79 | * @param string $text |
||
80 | * |
||
81 | * @return \Longman\TelegramBot\Entities\ServerResponse |
||
82 | * @throws \Longman\TelegramBot\Exception\TelegramException |
||
83 | */ |
||
84 | private function removeKeyboard($text) |
||
94 | |||
95 | /** |
||
96 | * Execute no db |
||
97 | * |
||
98 | * @return \Longman\TelegramBot\Entities\ServerResponse |
||
99 | * @throws \Longman\TelegramBot\Exception\TelegramException |
||
100 | */ |
||
101 | public function executeNoDb() |
||
105 | } |
||
106 |