Closed furkansimsekli closed 1 year ago
I think that the new feature for admin interface can be implemented like the feedback system. When an error/warning occurs, bot sends message to admin(s). Edit: I took a look at logging.py, I think that when log levels "30, 40, 50" occurs, the log also can be sent to admin(s).
Problem
When a user uses an unsupported language, it breaks the bot. Default language must be defined at first instead of using user's telegram app language.
Old:
language = user.language_code
New:language = 'tr'
Notes
I saw this problem when I got four same announcement from Student Affairs Office today. It also would be better to expect new possible exceptions and errors, in this case program was expecting only
telegram.error.Unauthorized
, so it failed to update database. Also, we can update the database beforehand. However, I think expanding except blocks is a better idea, because we would understand what went wrong easily.I also want to implement a new feature for admin interface. Since, regularly checking the logs is hard we should immediately warn the admin(s) on Telegram in these type of situations.