atipugin / telegram-bot-ruby

Ruby wrapper for Telegram's Bot API
https://core.telegram.org/bots/api
Do What The F*ck You Want To Public License
1.35k stars 217 forks source link

AnswerInlineQuery not work correctly #254

Closed Murloc111 closed 1 year ago

Murloc111 commented 2 years ago

When i update gem from 0.15 to latest 0.19.2, i have errors on sending AnswerInlineQuery:

(ruby 2.7.3)

results.push Telegram::Bot::Types::InlineQueryResultCachedMpeg4Gif.new( id: row.id, mpeg4_file_id: row.name ) bot.api.answer_inline_query(inline_query_id: query_id, results: results, cache_time: 0) if !results.nil?

I have error:

Telegram API has returned the error. (ok: "false", error_code: "400", description: "Bad Request: can't parse inline query result: Field "input_message_content" must be of type Object")

However field "input_message_content" is optional, and not to be send, if i dont set it.

Thanks!

mvondoyannick commented 1 year ago

I have the same issue, need your help please Capture d’écran du 2023-01-13 19-19-40

thanks

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.