The bot currently creates multiple connections to the same database in different files. This can be problematic and is not really necessary when the bot is only in one server. Simplifying this with a database class that provides all operations will make things easier and only need you to instantiate the class to a variable and then do deferred imports with the db variable as needed.
The bot currently creates multiple connections to the same database in different files. This can be problematic and is not really necessary when the bot is only in one server. Simplifying this with a database class that provides all operations will make things easier and only need you to instantiate the class to a variable and then do deferred imports with the db variable as needed.
Here's an example of my bot's database class using PyMySQL. If you were to use it, you'd need to update the
yield from
references and the like to be in matching with your existing code for await etc: https://github.com/SajuukBot/SajuukBot/blob/py-dev/python/class_database.pyI was asked to make this ticket to remind AEnterprise, hopefully this will help the bot :)