telegram-bot-go
telegram-bot-go copied to clipboard
APIResponseMessage result should handle bool also?
Thanks for sharing this package!
I'm using EditMessageText but getting this error:
2018/05/11 20:06:39 * json parse error: json: cannot unmarshal bool into Go struct field APIResponseMessage.result of type telegrambot.Message ({"ok":true,"result":true})
I'm a newbie of go but to me looks like json.Unmarshal within requestResponseMessage doesn't know how to populate APIResponseMessage's Result:result with the received but unexpected "result":true.
Perhaps EditMessageText should use something like requestResponseBool ?
edit
I'm testing this and it seems to work
Oh, sorry I'm soooo late.
Maybe it is due to the difference between the response formats of bot and user.
It says: On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned..
I'll fix it as soon as I find any graceful solution for this issue.
Thank you :-)
I added a new type and changed related codes for this issue. (d0041488a1b04a13ca36a691dca1d89aa847e6b3)
Hope it would help you with your case.
Thanks, I'm currently working on something else, but in the future I may get back to it