H
H
Heppart2018-02-01 14:54:20
Telegram
Heppart, 2018-02-01 14:54:20

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

1 answer(s)
O
Oleg, 2018-02-01
@402d

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 question

Ask a Question

731 491 924 answers to any question