handle send method returning image hash
This commit is contained in:
6
main.py
6
main.py
@@ -359,10 +359,10 @@ async def send_callback(cq: CallbackQuery):
|
|||||||
"id": 0,
|
"id": 0,
|
||||||
})
|
})
|
||||||
resp = r.json()
|
resp = r.json()
|
||||||
if 'result' in resp and resp['result'] == True:
|
if resp.get('result') == 'duplicate':
|
||||||
await cq.answer('Sent')
|
|
||||||
elif 'result' in resp and resp['result'] == 'duplicate':
|
|
||||||
await cq.answer('Duplicate')
|
await cq.answer('Duplicate')
|
||||||
|
elif resp.get('result'):
|
||||||
|
await cq.answer('Sent')
|
||||||
else:
|
else:
|
||||||
raise Exception(resp)
|
raise Exception(resp)
|
||||||
except:
|
except:
|
||||||
|
|||||||
Reference in New Issue
Block a user