Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

Remove invalid subscribers #24

Open
zachkont opened this issue Nov 8, 2017 · 3 comments
Open

Remove invalid subscribers #24

zachkont opened this issue Nov 8, 2017 · 3 comments

Comments

@zachkont
Copy link
Owner

zachkont commented Nov 8, 2017

When a user has blocked the bot or a group has removed it without unsubscribing, the telegram API returns:
2017-11-08 14:52:30,194 (updater.py:82 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. The server returned HTTP 403 Forbidden. Response body: [{"ok":false,"error_code":403,"description":"Forbidden: bot was blocked by the user"}]"
and:
2017-11-08 14:52:31,062 (updater.py:90 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. The server returned HTTP 403 Forbidden. Response body: [{"ok":false,"error_code":403,"description":"Forbidden: bot was kicked from the group chat"}]"
respectively.
It would be best if in such cases the corresponding users/groups where removed from the subscribers list

zachkont added a commit that referenced this issue Nov 15, 2017
Add /help and /info as proposed in #26 and #31
Remove invalid subscribers as proposed in #24
@zachkont
Copy link
Owner Author

zachkont commented Feb 14, 2018

Two more error checks related to this:

[{"ok":false,"error_code":400,"description":"Bad Request: group chat was migrated to a supergroup chat","parameters":{"migrate_to_chat_id":-xxxxxx}}]" 2018-02-09 01:32:51,302 (updater.py:112 MainThread) 
[{"ok":false,"error_code":400,"description":"Bad Request: chat not found"}]"

@mathagician
Copy link

@zachkont please close the issue if resolved

@zachkont
Copy link
Owner Author

zachkont commented May 1, 2018

@mathagician the error codes mentioned in my previous comment are not being handled currently

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants