Telegram Botman – getBotMessages not working

  botman, bots, laravel, telegram, telegram-bot

Hi i need the last message id that send with bot
and i want to get last message bot in conversation
when i print that on serialize
to then get id with this way
return this

i want this for reply to the last bot message

this is my code

    $text = "Hello world";

    $parameters = [
        'chat_id' => $this->bot->getBotMessages()[0]->getPayload()['chat']['id'],
        'reply_to_message_id' => $this->bot->getBotMessages()[0]->getPayload()['message_id'],
        'text' => $text

Source: Laravel

Leave a Reply