Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -498,7 +498,10 @@ def get_description() -> str:
|
|
| 498 |
return ""
|
| 499 |
|
| 500 |
|
| 501 |
-
def fetch_avatar_bytes() -> bytes | None:
|
|
|
|
|
|
|
|
|
|
| 502 |
"""Get latest profile photo of the bot as bytes (or None if unavailable)"""
|
| 503 |
try:
|
| 504 |
me = requests.get(f"{TELEGRAM_API}/getMe", timeout=5).json()
|
|
|
|
| 498 |
return ""
|
| 499 |
|
| 500 |
|
| 501 |
+
# def fetch_avatar_bytes() -> bytes | None:
|
| 502 |
+
from typing import Optional
|
| 503 |
+
|
| 504 |
+
def fetch_avatar_bytes() -> Optional[bytes]:
|
| 505 |
"""Get latest profile photo of the bot as bytes (or None if unavailable)"""
|
| 506 |
try:
|
| 507 |
me = requests.get(f"{TELEGRAM_API}/getMe", timeout=5).json()
|