go-telegram / bot

Telegram Bot API Go framework
MIT License
502 stars 46 forks source link

Error: cannot unmarshal object into Go struct field Message.channel_post.chat_background_set of type models.BackgroundType #90

Closed ArsArsArsArs closed 2 weeks ago

ArsArsArsArs commented 2 weeks ago

When a bot checks for updates, it may run into the error. Then it won't be able to proceed with handling the updates and will stuck.

The error message: [TGBOT] [ERROR] error get updates, error decode response result for method getUpdates, json: cannot unmarshal object into Go struct field Message.channel_post.chat_background_set of type models.BackgroundType

Looks like the library incorrectly works with updates containing background setting in channels.

negasus commented 2 weeks ago

Can you run bot with bot.WithDebug() options and send me payload which occur an error?

ArsArsArsArs commented 2 weeks ago

I had to clean the updates even before I posted the issue in order to restore the operation of my bot. Hence, I don't have that message anymore. Sorry.

If it appears again, I'll report it immediately

negasus commented 2 weeks ago

Thanks, I close the issue. Feel free for reopen