Merge pull request #64 from Rilliat/v1.6.9

Changed incomprehensible error messages from telegram to readable bea…
pull/68/head
Who? 2025-01-15 03:59:35 +10:00 committed by GitHub
commit da1a6ce1c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -68,6 +68,8 @@ def override_text(exception: Exception) -> typing.Optional[str]:
"""Returns error-specific description if available, else `None`"""
if isinstance(exception, NetworkError):
return "✈️ <b>You have problems with internet connection on your server.</b>"
if 'Telegram is having internal issues' in str(exception):
return "✈️ <b>Telegram has problems with their datacenters.</b>"
return None