Commit 5497c5a3 authored by Marco Boretto's avatar Marco Boretto

Merge pull request #142 from noplanman/137-fix_hidekeyboard_command

Fix hidekeyboard command
parents 1fada92f b4f77bd4
...@@ -11,8 +11,9 @@ ...@@ -11,8 +11,9 @@
namespace Longman\TelegramBot\Commands\UserCommands; namespace Longman\TelegramBot\Commands\UserCommands;
use Longman\TelegramBot\Commands\UserCommand; use Longman\TelegramBot\Commands\UserCommand;
use Longman\TelegramBot\Request; use Longman\TelegramBot\Entities\ReplyKeyboardHide;
use Longman\TelegramBot\Entities\ReplyKeyboardMarkup; use Longman\TelegramBot\Entities\ReplyKeyboardMarkup;
use Longman\TelegramBot\Request;
/** /**
* User "/hidekeyboard" command * User "/hidekeyboard" command
...@@ -25,7 +26,7 @@ class HidekeyboardCommand extends UserCommand ...@@ -25,7 +26,7 @@ class HidekeyboardCommand extends UserCommand
protected $name = 'hidekeyboard'; protected $name = 'hidekeyboard';
protected $description = 'Hide the custom keyboard'; protected $description = 'Hide the custom keyboard';
protected $usage = '/hidekeyboard'; protected $usage = '/hidekeyboard';
protected $version = '0.0.5'; protected $version = '0.0.6';
/**#@-*/ /**#@-*/
/** /**
...@@ -36,10 +37,11 @@ class HidekeyboardCommand extends UserCommand ...@@ -36,10 +37,11 @@ class HidekeyboardCommand extends UserCommand
$message = $this->getMessage(); $message = $this->getMessage();
$chat_id = $message->getChat()->getId(); $chat_id = $message->getChat()->getId();
$data = []; $data = [
$data['chat_id'] = $chat_id; 'chat_id' => $chat_id,
$data['text'] = 'Keyboard Hided'; 'text' => 'Keyboard Hidden',
$data['reply_markup'] = new ReplyKeyboardHide([ 'selective' => false]); 'reply_markup' => new ReplyKeyboardHide(['selective' => false]),
];
return Request::sendMessage($data); return Request::sendMessage($data);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment