From 69ef3487706fa4b80762bed165dbcbc352f3aaca Mon Sep 17 00:00:00 2001 From: Rilliat Date: Tue, 14 Jan 2025 20:57:37 +0300 Subject: [PATCH] Changed incomprehensible error messages from telegram to readable beautiful messages --- hikka/log.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hikka/log.py b/hikka/log.py index b2955f5..7599d88 100644 --- a/hikka/log.py +++ b/hikka/log.py @@ -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 "✈️ You have problems with internet connection on your server." + if 'Telegram is having internal issues' in str(exception): + return "✈️ Telegram has problems with their datacenters." return None