Похожие чаты

Why does client.action not work well with asyncio.sleep?

10 ответов

13 просмотров
=⁠_⁠=- Автор вопроса

Especially typing

Any particular issue?

=⁠_⁠=- Автор вопроса
⎞ .·. ⎝ ⎝
Any particular issue?

At the asyncio.sleep block action stops

=⁠_⁠=
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 shouldn't stop anything, sleep in the client.ac...

it's set to info I'm not comfortable otherwise It blocks temporarily and as soon as the sleep is done it resumes typing

=⁠_⁠=- Автор вопроса
⎞ .·. ⎝ ⎝
it shouldn't stop anything, sleep in the client.ac...

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()

=⁠_⁠=
Btw is doing async with client.action(chat, 'canc...

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):…

=⁠_⁠=
Um I meant like action = "typing" if bot_action e...

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

=⁠_⁠=- Автор вопроса
⎞ .·. ⎝ ⎝
You can try and see if it goes fine. the "cancel" ...

Okay then I'm currently refactoring code like I mentioned previously Will debug this properly if bug still persists.

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта