remove unnecessary set_typing calls

This commit is contained in:
JerryXiao 2018-12-20 21:34:27 +08:00
parent b4b6b9786f
commit 8302fce45b
Signed by: Jerry
GPG key ID: 9D9CE43650FF2BAA

3
bot.py
View file

@ -110,10 +110,9 @@ async def inline_query(fail=None):
INTERVAL = 5 INTERVAL = 5
seconds = int(seconds) seconds = int(seconds)
if seconds <= 0: if seconds <= 0:
await set_typing() pass
else: else:
if seconds <= INTERVAL: if seconds <= INTERVAL:
await set_typing()
await asyncio.sleep(INTERVAL) await asyncio.sleep(INTERVAL)
else: else:
rounds = int(seconds/INTERVAL) rounds = int(seconds/INTERVAL)