1 | <?php |
||
21 | class HidekeyboardCommand extends UserCommand |
||
22 | { |
||
23 | /**#@+ |
||
24 | * {@inheritdoc} |
||
25 | */ |
||
26 | protected $name = 'hidekeyboard'; |
||
27 | protected $description = 'Hide the custom keyboard'; |
||
28 | protected $usage = '/hidekeyboard'; |
||
29 | protected $version = '0.0.6'; |
||
30 | /**#@-*/ |
||
31 | |||
32 | /** |
||
33 | * {@inheritdoc} |
||
34 | */ |
||
35 | public function execute() |
||
36 | { |
||
37 | $message = $this->getMessage(); |
||
38 | $chat_id = $message->getChat()->getId(); |
||
39 | |||
40 | $data = [ |
||
41 | 'chat_id' => $chat_id, |
||
42 | 'text' => 'Keyboard Hidden', |
||
43 | 'reply_markup' => new ReplyKeyboardHide(['selective' => false]), |
||
44 | ]; |
||
45 | |||
46 | return Request::sendMessage($data); |
||
47 | } |
||
48 | } |
||
49 |