MitchellAW / FlandersBOT

A discord bot with commands surrounding The Simpsons, Futurama and Rick and Morty and more!
https://discord.gg/xMmxMYg
MIT License
8 stars 2 forks source link

Move DB connection from on_ready() #23

Closed MitchellAW closed 3 years ago

MitchellAW commented 3 years ago

Currently, FlandersBOT connects to the database using the on_ready() event, this fires multiple times and does not ensure that the db connection is established before querying any tables. The connection needs to be created before the bot connects.

MitchellAW commented 3 years ago

Fixed with: 3aaa566499567baee8802c13b25c2822a9fc7db6 Now ensures db pool connects before bot launches.