fix(aurora): removed a useless try/except block
This commit is contained in:
parent
e988917319
commit
afac274978
1 changed files with 2 additions and 7 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue