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: