Especially typing
Any particular issue?
At the asyncio.sleep block action stops
it shouldn't stop anything, sleep in the client.action doesn't affect the task that sends the requests, it can be some internal issue with the task erroring, make sure you have proper logs set to INFO at least
it's set to info I'm not comfortable otherwise It blocks temporarily and as soon as the sleep is done it resumes typing
Btw is doing async with client.action(chat, 'cancel'): Okay ? I don't want to do if bot_action: async with client.action(chat, 'typing'): do_something() else: do_something()
client.action will expire after some seconds, it needs a with block
Um I meant like action = "typing" if bot_action else "cancel" async with client.action(chat, action):…
You can try and see if it goes fine. the "cancel" isn't an issue, the action will also expire by itself in few seconds if there is no other with client.action actively sending more, canceling is optional. but you may have a bug in code if the action itself isn't showing properly
Okay then I'm currently refactoring code like I mentioned previously Will debug this properly if bug still persists.
Обсуждают сегодня