在电报机器人中通过发送消息方法发送消息时,有一种简单的方法可以禁用通知。但是,我们如何在使用 reply_markup 选项时禁用通知?
例如 ,
$url = "$website/sendMessage?chat_id=$chat_id&text=$text& disable_notification=true";
file_get_contents($url); // It works perfect`
但 ,
$keyboard = [['text' => $text]];
$replymarkup = [
'keyboard' => $keyboard ,
'resize_keyboard' => true ,
'one_time_keyboard' => true
];
$encodemarkup = json_encode($replymarkup);
$welcome = $text;
$url = "$website/sendmessage?chat_id=$chat_id&text=$welcome& disable_notification=true&reply_markup=$encodemarkup";
file_get_contents($url); //It does not mute notification