go-telegram-bot-api / telegram-bot-api

Golang bindings for the Telegram Bot API
https://go-telegram-bot-api.dev
MIT License
5.72k stars 880 forks source link

Error sending callback query #491

Closed salkrr closed 2 years ago

salkrr commented 2 years ago

Version v5.4.0-beta.0

When I send answer on callback message using the bot.Send() function, it returns an error:

2021/11/19 02:23:27 Endpoint: answerCallbackQuery, params: map[callback_query_id:1268880497923343434 text:some message]
2021/11/19 02:23:28 Endpoint: answerCallbackQuery, response: {"ok":true,"result":true}
2021/11/19 02:23:28 json: cannot unmarshal bool into Go value of type tgbotapi.Message

Obviously, this is because the Send function expects the result to be a tgbotapi.Message, when in fact it is a bool.