Answer the question
In order to leave comments, you need to log in
How to change the name of the buttons in the telegram bot?
Hello, I'm interested in the question of how to change the name of the buttons in the telegram bot so that they are without "/" and that when you click on the button, exactly that command comes out.
function sendMessage($id,$text)
{
global $api;
$keyboard = ;
$resp = ["keyboard" => $keyboard,"resize_keyboard" => true,"one_time_keyboard" => false];
$reply = json_encode($resp);
$query = $api. '/sendMessage?chat_id='. $id .'&reply_markup='.$reply.'&text='.urlencode($text);
file_get_contents($query);
}
Answer the question
In order to leave comments, you need to log in
https://core.telegram.org/bots/api#inlinekeyboardbutton
You need to use inline_keyboard, or do this
And in message processing, perform actions not only with "/help", but also with "help"
$keyboard = ;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question