TelegramBot / Api

Native PHP Wrapper for Telegram BOT API
MIT License
1.06k stars 324 forks source link

How to use answerInlineQuery? can you give me an example? #325

Closed ihorBielovol closed 1 year ago

ihorBielovol commented 3 years ago

How to use answerInlineQuery? can you give me an example?

Screenshot from 2021-03-25 11-52-51

Screenshot from 2021-03-25 11-53-43

artcd commented 1 year ago
$bot->inlineQuery(function($update) use ($bot){
$content = new Text('artpro.dev', 'html');
$result = new Article(time(),'Title', 'description',null,null,null, $content);
$bot->answerInlineQuery($update->getId(), [$result]);
$bot->sendMessage($update->getId(), $update->getid().$update->getQuery());
});