fix(aurora): fixed an incorrectly named column in on_member_join

This commit is contained in:
Seaswimmer 2024-05-03 20:44:04 -04:00
parent 1a74ce9130
commit bcef643349
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -117,7 +117,7 @@ class Aurora(commands.Cog):
async def addrole_on_member_join(self, member: discord.Member): async def addrole_on_member_join(self, member: discord.Member):
"""This method automatically adds roles to users when they join the server.""" """This method automatically adds roles to users when they join the server."""
if not await self.bot.cog_disabled_in_guild(self, member.guild): if not await self.bot.cog_disabled_in_guild(self, member.guild):
query = f"""SELECT moderation_id, role_id, reason FROM moderation_{member.guild.id} WHERE target_id = ? AND action = 'ADDROLE' AND expired = 0 AND resolved = 0;""" query = f"""SELECT moderation_id, role_id, reason FROM moderation_{member.guild.id} WHERE target_id = ? AND moderation_type = 'ADDROLE' AND expired = 0 AND resolved = 0;"""
database = connect() database = connect()
cursor = database.cursor() cursor = database.cursor()
cursor.execute(query, (member.id,)) cursor.execute(query, (member.id,))