Replies: 1 comment 1 reply
-
This question is really broad, but fundamentally you need to read up more on asynchronous programming and make sure you're not blocking as defined in the FAQ. You can circumvent blocking by doing a few things, the easiest is to swap your HTTP calls from |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm fairly new to python and I'm working on a discord bot using discord py that uses the FastF1 api and gets data from it and turns it into plots using matplotlib and seaborn. The problem is that I can't make it so that multiple people can be using the bot at the same time because when a command is being used if you try to use a command it fails to send the message and says "The application did not respond". I've tried to look for solutions using multithreading and running each command in the executor but matplotlib doesn't work all the time when I do that.
Is there any way to make it so that multiple commands can be used while the bot is "thinking" or executing the code for that command? These commands take about a minute but with more users and more load it needs a solution. Can I do it with discord py or do I need to switch do a different language?
Example code for command:
Beta Was this translation helpful? Give feedback.
All reactions