Description
It is possible to stop a bot-chat in telegram. When a user does this, the API returns an error after trying to send a message to the users chat-id. Currently, this errors are catched within the exception handling and the chat-id remains in the db. It is desirable to remove those entries from the db, so the Telegram-API is not called twice a day with those entries.
Steps to reproduce
Register with a zip-code with disposal today/tomorrow
Stop Chat
Run altpapierBot.py
Error should be logged in error.log
Possible Solution
Delete db entry after a permission error
Aktuell wird für jeden DB-Eintrag 2 Requests auf die Web-Api gemacht um die Disposal Tage zu erhalten. Dies sollte so umgebaut werden, dass nur einmalig für jede PLZ in der DB die Aufrufe gemacht werden