handle send method returning image hash
This commit is contained in:
parent
01ba70c0ce
commit
60c6448f72
6
main.py
6
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:
|
||||
|
Loading…
Reference in New Issue
Block a user