Skip to content

Commit 5497c5a

Browse files
committed
Merge pull request #142 from noplanman/137-fix_hidekeyboard_command
Fix hidekeyboard command
2 parents 1fada92 + b4f77bd commit 5497c5a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

examples/Commands/HidekeyboardCommand.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
namespace Longman\TelegramBot\Commands\UserCommands;
1212

1313
use Longman\TelegramBot\Commands\UserCommand;
14-
use Longman\TelegramBot\Request;
14+
use Longman\TelegramBot\Entities\ReplyKeyboardHide;
1515
use Longman\TelegramBot\Entities\ReplyKeyboardMarkup;
16+
use Longman\TelegramBot\Request;
1617

1718
/**
1819
* User "/hidekeyboard" command
@@ -25,7 +26,7 @@ class HidekeyboardCommand extends UserCommand
2526
protected $name = 'hidekeyboard';
2627
protected $description = 'Hide the custom keyboard';
2728
protected $usage = '/hidekeyboard';
28-
protected $version = '0.0.5';
29+
protected $version = '0.0.6';
2930
/**#@-*/
3031

3132
/**
@@ -36,10 +37,11 @@ public function execute()
3637
$message = $this->getMessage();
3738
$chat_id = $message->getChat()->getId();
3839

39-
$data = [];
40-
$data['chat_id'] = $chat_id;
41-
$data['text'] = 'Keyboard Hided';
42-
$data['reply_markup'] = new ReplyKeyboardHide([ 'selective' => false]);
40+
$data = [
41+
'chat_id' => $chat_id,
42+
'text' => 'Keyboard Hidden',
43+
'reply_markup' => new ReplyKeyboardHide(['selective' => false]),
44+
];
4345

4446
return Request::sendMessage($data);
4547
}

0 commit comments

Comments
 (0)