Commit 35394a63 authored by MBoretto's avatar MBoretto

Moving examples to CommandsExamples

parent ac2bbc94
......@@ -41,16 +41,10 @@ class ForceReplyCommand extends Command
$data['text'] = 'Write something:';
#$data['reply_to_message_id'] = $message_id;
$json = (
new ForceReply(
array(
'selective' => false
)
)
)->toJSON();
$force_reply = new ForceReply(['selective' => false]);
#echo $json;
$data['reply_markup'] = $json;
$data['reply_markup'] = $force_reply;
$result = Request::sendMessage($data);
......
......@@ -41,15 +41,9 @@ class HidekeyboardCommand extends Command
$data['text'] = 'Keyboard Hided';
#$data['reply_to_message_id'] = $message_id;
$json = (
new ReplyKeyBoardHide(
array(
'selective' => false
)
)
)->toJSON();
$data['reply_markup'] = $json;
$reply_keyboard_hide = new ReplyKeyboardHide([ 'selective' => false]);
$data['reply_markup'] = $reply_keyboard_hide;
$result = Request::sendMessage($data);
return $result;
......
......@@ -84,18 +84,16 @@ class KeyboardCommand extends Command
unset($keyboard);
$json = (
new ReplyKeyboardMarkup(
array(
'keyboard' => $keyboards[1] ,
'resize_keyboard' => true,
'one_time_keyboard' => false,
'selective' => false
)
)
)->toJSON();
$reply_keyboard_markup = new ReplyKeyboardMarkup(
[
'keyboard' => $keyboards[1] ,
'resize_keyboard' => true,
'one_time_keyboard' => false,
'selective' => false
]
);
#echo $json;
$data['reply_markup'] = $json;
$data['reply_markup'] = $reply_keyboard_markup;
$result = Request::sendMessage($data);
return $result;
......
......@@ -279,7 +279,7 @@ class DB
$sth2->bindParam(':id', $chat_id, \PDO::PARAM_INT);
$sth2->bindParam(':title',$chat->getTitle() , \PDO::PARAM_STR, 255);
$sth2->bindParam(':title', $chat->getTitle(), \PDO::PARAM_STR, 255);
$sth2->bindParam(':date', $date, \PDO::PARAM_STR);
$status = $sth2->execute();
......
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