fizruk / telegram-bot-simple

Easy to use library for building Telegram bots in Haskell.
BSD 3-Clause "New" or "Revised" License
108 stars 54 forks source link

Ignore updates that produce parse failures #175

Closed s-and-witch closed 6 months ago

s-and-witch commented 6 months ago

I implemented updates fetching as a list of Value, so that allow us to receive some of the updates even if the others can't be parsed due to API changes. Tested on github.com/s-and-witch/playground-hs, here is an example of error message:

Failed to parse an update! Please, make sure you have the latest version of telegram-bot-api library and consider opening an issue if so. Error message: Error in $.message.entities[0].type: parsing Telegram.Bot.API.Types.MessageEntity.MessageEntityType failed, expected one of the tags ["mention","hashtag","bot_command","url","email","bold","italic","underline","strikethrough","code","pre","text_link","text_mention","cashtag","phone_number","spoiler","custom_emoji"], but found tag "blockquote"

swamp-agr commented 6 months ago

Awesome! Thank you!