1 | <?php |
||
20 | class ForceReplyCommand extends UserCommand |
||
21 | { |
||
22 | /**#@+ |
||
23 | * {@inheritdoc} |
||
24 | */ |
||
25 | protected $name = 'forcereply'; |
||
26 | protected $description = 'Force reply with reply markup'; |
||
27 | protected $usage = '/forcereply'; |
||
28 | protected $version = '0.1.0'; |
||
29 | /**#@-*/ |
||
30 | |||
31 | /** |
||
32 | * {@inheritdoc} |
||
33 | */ |
||
34 | public function execute() |
||
35 | { |
||
36 | $chat_id = $this->getMessage()->getChat()->getId(); |
||
37 | |||
38 | $data = [ |
||
39 | 'chat_id' => $chat_id, |
||
40 | 'text' => 'Write something:', |
||
41 | 'reply_markup' => Keyboard::forceReply(), |
||
42 | ]; |
||
43 | |||
44 | return Request::sendMessage($data); |
||
45 | } |
||
46 | } |
||
47 |