Changed incomprehensible error messages from telegram to readable beautiful messages

pull/64/head
Rilliat 2025-01-14 20:57:37 +03:00
parent a0468375c1
commit 69ef348770
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