reo7sp / tgbot-cpp

C++ library for Telegram bot API
http://reo7sp.github.io/tgbot-cpp
MIT License
1k stars 244 forks source link

TgTypeParser: handle user blocked case #52

Open fnc12 opened 7 years ago

fnc12 commented 7 years ago

My bot catches exception during longPoll.start() call saying Forbidden: user blocked (or something like this). I need to know which user has blocked my bot to disable my service subscription fir him/her. Thanks

ghost commented 7 years ago

Library seems to be unmaintained for a while, so it's unlikely that anybody will implement it. It would be nice if you do it yourself and send PR.

ghost commented 6 years ago

The same problem here

hrkrshnn commented 4 years ago

@fnc12 I think this only happens when you try to send messages. A temporary fix would be to put sendMessage function inside a try catch block. I agree, it would be great to have a 'did user block me' function.