From 60c6448f72df73b8d5a76285a6fcef934f9ddb52 Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Fri, 25 Jul 2025 17:53:22 +0300 Subject: [PATCH] handle send method returning image hash --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 81b2c5f..e99df22 100644 --- a/main.py +++ b/main.py @@ -359,10 +359,10 @@ async def send_callback(cq: CallbackQuery): "id": 0, }) resp = r.json() - if 'result' in resp and resp['result'] == True: - await cq.answer('Sent') - elif 'result' in resp and resp['result'] == 'duplicate': + if resp.get('result') == 'duplicate': await cq.answer('Duplicate') + elif resp.get('result'): + await cq.answer('Sent') else: raise Exception(resp) except: