unreal4u / telegram-api

Complete async capable Telegram bot API implementation for PHP7
https://github.com/unreal4u/telegram-api/wiki
MIT License
793 stars 174 forks source link

Fixed return type for AnswerInlineQuery::getResults #123

Closed DJTommek closed 4 years ago

unreal4u commented 4 years ago

Hi and thanks for this PR! I believe that function returns an encoded json which is a string, but I'll be able to test this further on wednesday.

In the meantime I'll just merge. If everything is ok, a new release will be launched on.. you've guessed it: wednesday haha

DJTommek commented 4 years ago

Thanks 👍

According your source code in addResult() it's array of Result objects multi-dimensional arrays with various of objects as Logger, in my case reply_markup => Inline\Keyboard\Markup, input_message_content => InputMessageContent\Text etc. I'm using your getResult() method for checking, if there is at least one inline query answer look here and it works just fine. Otherwise I would need to maintain list of answers by myself.