Runtime Exception
Basically, my bot doesn't work at all, because of broken json derivation. Recently Telegram has updated its api and has added custom emojis.
I'm getting
scala.MatchError: custom_emoji (of class java.lang.String)
exception
Is it possible to add logic to drop unsupported messages with warning in logs instead of getting such exception? Or add some configuration what to do throw or not.
I've published a new Telegramium version supporting Telegram Bot API 6.2, it should (hopefully) fix this error: https://github.com/apimorphism/telegramium/releases/tag/7.62.0. In the meantime I'll think how to avoid this type of errors in the future.
I think it would be nice to just send warning message that syas something like "looks like you version isn't compatible with current tg api, pls update or do nothing" =)
I really don't want to drop any messages, because parsing can fail for a lot of reasons including bugs in the library. I've added a suggestion to update Telegramium to decoding errors, thanks.
The problem is that Bot API added a new enum value and it's a breaking change for this library. It looks like other Scala/Java Telegram Bot API libraries don't try to be forward compatible in this regard too.