fix result not present in telegram api response

This commit is contained in:
jerryfletcher21
2025-05-14 00:08:50 +02:00
parent 1758896d4d
commit 0557dd6b89

View File

@ -39,7 +39,7 @@ class Command(BaseCommand):
f.write(f"Error getting updates: {e}\n{traceback.format_exc()}\n")
continue
if not response["result"]:
if not "result" in response or not response["result"]:
continue
for result in response["result"]:
if not result.get("message") or not result.get("message").get("text"):