I need to get information about the message sent by the bot. How can I save such messages in the database?
After every sendMessage request you can can grab it's result like this:
$result = Request::sendMessage($data);
if ($result->isOk()) {
$sentMessage = $result->getResult(); //Message object
}
Then you can use DB::getPdo() and make a query to the database and save it there.
Most helpful comment
After every
sendMessagerequest you can can grab it's result like this:Then you can use
DB::getPdo()and make a query to the database and save it there.