Answer the question
In order to leave comments, you need to log in
Does anyone have an example of editMessageText in Telegram?
Newbie in programming. I want to replace messages when a button is clicked. Banal change from bot.sendMessage to bot.editMessageText was unsuccessful...
Example:
bot.sendMessage(query.message.chat.id, `Test `, {
reply_markup: {inline_keyboard:}
Answer the question
In order to leave comments, you need to log in
editing the wrong post
$update = $this->getUpdate();
$callback_query = $update->getCallbackQuery();
$message_id = $callback_query->getMessage()->getMessageId();
$chat_id = $callback_query->getMessage()->getChat()->getId();
Request::editMessage([
'chat_id' => $chat_id,
'message_id' => $message_id,
'text' => 'новый текст'
]);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question