bot4s / telegram

Telegram Bot API Wrapper for Scala
Apache License 2.0
418 stars 101 forks source link

Bot spams with error "Unable to decode update 683818374" #442

Open kitbuilder587 opened 1 week ago

kitbuilder587 commented 1 week ago

The whole message is:

Unable to decode update 683818374: Int: DownField(iconCustomEmojiId),DownField(forumTopicCreated),DownField(replyToMessage),DownField(editedMessage),DownArray,DownField(result).

It throws in com.bot4s.telegram.cats.Polling in line 24. Is it ok to always receive this error? Bot works fine, but spam in log confuses

ex0ns commented 1 week ago

Hello ! Thank you for reporting the error, it's not normal (but happy that it does not crashes the whole bot). As you can see here https://github.com/search?q=repo%3Abot4s%2Ftelegram%20iconCustomEmojiId&type=code

The documentation does not match the type of the field in some of those classes iconCustomEmojiId: Option[Int] = None when it should probably be string.

According to the doc:

I might have some time to fix that but I can't commit on a date. Those are minor changes and if you have the time, would you be willing opening a PR to fix them ?

There might be other places where iconCustomEmojiId is used that I have missed

kitbuilder587 commented 5 days ago

Ok, i'll open PR