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

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

Unmarshal error when sendChatAction return only bool value #639

Open peanut996 opened 1 year ago

peanut996 commented 1 year ago

When send a chat action typing telegram api will only return "true" which cause

err: json: cannot unmarshal bool into Go value of type tgbotapi.Message

so should we add more judgement when unmarshal api response?

FluorescentTouch commented 1 year ago

When send a chat action typing telegram api will only return "true" which cause

err: json: cannot unmarshal bool into Go value of type tgbotapi.Message

so should we add more judgement when unmarshal api response?

Read this comment, that should help