reo7sp / tgbot-cpp

C++ library for Telegram bot API

Home Page:http://reo7sp.github.io/tgbot-cpp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: Api method editMessageText should only take InlineKeboardMarkup

paulusel opened this issue · comments

Telegram's Api method editMessageText expects its keyboard markup to be only InlineKeyboardMarkup as it is explicitly said so in here.

https://core.telegram.org/bots/api#editmessagetext

But right now tgbot-cpp's implementation of the editMessageText takes GenericReply which can take all keyboard markup types. I for one erroneously thought I could send ForceReply type since it is also derived from GenericReply. Compiler didn't complain as the current tgbot-cpp implementation accepts all types. But telegram's api rejected the request which ended in crash due to exception thrown(yes, I should probably start catching exceptions :).