tgbot-cpp icon indicating copy to clipboard operation
tgbot-cpp copied to clipboard

TgTypeParser: handle user blocked case

Open fnc12 opened this issue 7 years ago • 3 comments

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

fnc12 avatar Aug 12 '17 06:08 fnc12

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 avatar Aug 12 '17 10:08 ghost

The same problem here

ghost avatar Jul 24 '18 05:07 ghost

@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.

hrkrshnn avatar Feb 11 '20 20:02 hrkrshnn