EngineerMark / nayuta-bot

Discord anime bot
MIT License
0 stars 0 forks source link

Isolate guild "instances" to seperate threads #2

Closed EngineerMark closed 3 years ago

EngineerMark commented 3 years ago

Create a thread for every guild/server the bot resides in. This prevents most cases of full block when a large API call for example is being made.

Example:

  1. Message received
  2. Test for guild ID
  3. If no thread exists, create one
  4. Perform the remainder of checks inside a coroutine running from that thread
EngineerMark commented 3 years ago

Added. Commit: e0a571731ba01ed1674b95f455e4fc66628de58a