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.0.6'; |
||
29 | /**#@-*/ |
||
30 | |||
31 | /** |
||
32 | * {@inheritdoc} |
||
33 | */ |
||
34 | public function execute() |
||
35 | { |
||
36 | $message = $this->getMessage(); |
||
37 | $chat_id = $message->getChat()->getId(); |
||
38 | |||
39 | $data = [ |
||
40 | 'chat_id' => $chat_id, |
||
41 | 'text' => 'Write something:', |
||
42 | 'reply_markup' => new ForceReply(['selective' => false]), |
||
43 | ]; |
||
44 | |||
45 | return Request::sendMessage($data); |
||
46 | } |
||
47 | } |
||
48 |