0

$this->bot->getBotMessages(); 嗨,我需要与 bot 一起发送的最后一条消息 id,当我在序列化上打印该消息时 ,我想在对话中获取最后一条消息 bot, $this->bot->reply($this->bot->getBotMessages()); 然后以这种方式获取 id getPayload()['message_id'] 返回此 a:0:{}

我想要这个回复最后一条机器人消息

这是我的代码


    $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
    ];
    $this->bot->sendRequest('sendMessage',$parameters);
4

0 回答 0