defstudio / telegraph

Telegraph is a Laravel package for fluently interacting with Telegram Bots
MIT License
697 stars 118 forks source link

delete message with keyboard #580

Closed SarkorbekA closed 7 months ago

SarkorbekA commented 7 months ago
$sendingMessage = Telegraph::message('hello')
          ->keyboard(
               Keyboard::make()->buttons([
                                    Button::make("✅")->action('delete')->param('id', $sendingMessage->result->message_id),
               ])->chunk(1)
               )->send();

I wanted to do something like this, delete message button, but how to get the message's ID?

fabio-ivona commented 7 months ago

you can retrieve the message ID from the ->send() result

try to dump($sendingMessage)