handle send method returning image hash

This commit is contained in:
bakatrouble 2025-07-25 17:53:22 +03:00
parent 01ba70c0ce
commit 60c6448f72

View File

@ -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: