Repository navigation
|
Hello! I'm currently trying to create a typing indicator since I'm creating a discord bot with integrated AI and while generating the response I'd like it to indicate "typing". In the async with message.channel.typing():
platform_message = await self.handle_raw_message(message)
if self.orchestrator:
await self.orchestrator.route_message(platform_message)which supposedly (according to the docs atleast) is indicating "typing" for an indefinite amount of time. But even though I do this. The indicator still disappears after ~10 seconds. Is there anything else I'm missing? P.S.: Please let me know if you need additional information, I don't know how much one needs to see in order to resolve or understand this issue. |
Replies: 1 comment
|
It's 10 seconds per request. You need to "block" the event loop for the amount of seconds you want it. Using I know that you can use |
It's 10 seconds per request. You need to "block" the event loop for the amount of seconds you want it. Using
awaitdoesn't do that.I know that you can use
await asyncio.sleep(<seconds>)to make it longer, not sure about other ways.