1
0
Fork 0
mirror of synced 2024-05-03 04:02:28 +12:00

Wait until ready, to ensure the database has been loaded

This commit is contained in:
phxntxm 2019-02-03 18:59:53 -06:00
parent aabe972056
commit 9944673b1e

View file

@ -46,6 +46,8 @@ class Osu:
async def get_users(self):
"""A task used to 'cache' all member's and their Osu profile's"""
await self.bot.wait_until_ready()
query = "SELECT id, osu FROM users WHERE osu IS NOT NULL;"
rows = await self.bot.db.fetch(query)