From afac2749785e2b59cb007a6be0f3bb0e7fbb48ea Mon Sep 17 00:00:00 2001 From: Seaswimmer Date: Wed, 5 Jun 2024 01:36:45 -0400 Subject: [PATCH] fix(aurora): removed a useless try/except block --- aurora/aurora.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/aurora/aurora.py b/aurora/aurora.py index 3d7f683..f8f8605 100644 --- a/aurora/aurora.py +++ b/aurora/aurora.py @@ -12,7 +12,6 @@ import time from datetime import datetime, timedelta, timezone from math import ceil -import aiosqlite import discord from discord import Object from discord.ext import tasks @@ -1500,11 +1499,7 @@ class Aurora(commands.Cog): time_per_guild = time.time() tempban_query = f"SELECT * FROM moderation_{guild.id} WHERE end_timestamp IS NOT NULL 0 AND end_timestamp <= ? AND moderation_type = 'TEMPBAN' AND expired = 0" - - try: - tempbans = await Moderation.execute(bot=self.bot, guild_id=guild.id, query=tempban_query, parameters=(time.time(),)) - except aiosqlite.OperationalError: - continue + tempbans = await Moderation.execute(bot=self.bot, guild_id=guild.id, query=tempban_query, parameters=(time.time(),)) unban_num = 0 for moderation in tempbans: @@ -1592,7 +1587,7 @@ class Aurora(commands.Cog): continue addrole_num = 0 - removerole_query = f"SELECT target_id, moderation_id, role_id FROM moderation_{guild.id} WHERE end_timestamp IS NOT NULL 0 AND end_timestamp <= ? AND moderation_type = 'REMOVEROLE' AND expired = 0" + removerole_query = f"SELECT * FROM moderation_{guild.id} WHERE end_timestamp IS NOT NULL 0 AND end_timestamp <= ? AND moderation_type = 'REMOVEROLE' AND expired = 0" removeroles = await Moderation.execute(bot=self.bot, guild_id=guild.id, query=removerole_query, parameters=(time.time(),)) for moderation in removeroles: