How can I handle simultaneous interactions in Discord.py? #9012
-
I'm setting up a discord.py Client like so: (from here)
In my main script, I then handle for interactions like this:
If I call the /test command twice in a row (within 10 seconds), the second one will immediately get a "The application did not respond" message, but after 10 seconds will still try to process, but then the interaction is Unknown and raises the following error:
I assume I need some sort of parallel processing, but I've tried awaiting a separate async function and also using a multiprocessing.Process to do the work ( |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Have you tried using asyncio's sleep function? e.g. await asyncio.sleep(10) This should work without blocking execution globally |
Beta Was this translation helpful? Give feedback.
Have you tried using asyncio's sleep function? e.g.
This should work without blocking execution globally