fix connection acquire part of mass_fetch_balances
@@ -141,10 +141,12 @@ class Database(commands.Cog):
return (await self.fetch_user(uid))['emeralds']
async def mass_fetch_balances(self):
+ async with self.db.acquire() as con:
async for record in con.cursor('SELECT uid, emeralds FROM users'):
yield record
async def mass_fetch_votestreaks(self):
+ async with self.db.acquire() as con:
async for record in con.cursor('SELECT uid, vote_streak FROM users'):
yield record
