add debug to update_support_server_member_roles
@@ -30,6 +30,7 @@ class Database(commands.Cog):
@tasks.loop(minutes=10)
async def update_support_server_member_roles(self):
+ try:
await self.bot.wait_until_ready()
support_guild = self.bot.get_guild(self.d.support_server_id)
@@ -51,6 +52,8 @@ class Database(commands.Cog):
if roles != member.roles:
await member.edit(roles=roles)
+ except Exception as e:
+ await self.bot.get_channel(self.d.error_channel_id).send(e)
async def fetch_all_botbans(self):
botban_records = await self.db.fetch('SELECT uid FROM users WHERE bot_banned = true') # returns [Record<uid=>, Record<uid=>,..]
