fix(moderation): awaited coroutines
All checks were successful
Pylint / Pylint (push) Successful in 1m12s

This commit is contained in:
Seaswimmer 2023-10-06 09:36:23 -04:00
parent 9adfe1461f
commit 2fb7fd2d0c
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -492,7 +492,7 @@ class Moderation(commands.Cog):
cursor.execute(response_query, (interaction.guild.id, case_number))
result = cursor.fetchone()
case_dict = self.generate_dict(result)
embed = self.embed_factory('case', interaction=interaction, case_dict=case_dict)
embed = await self.embed_factory('case', interaction=interaction, case_dict=case_dict)
await interaction.response.send_message(content=f"✅ Moderation #{case_number} resolved!", embed=embed)
@app_commands.command(name="case")
@ -507,7 +507,7 @@ class Moderation(commands.Cog):
database.close()
if result:
case = self.generate_dict(result)
embed = self.embed_factory('case', interaction=interaction, case_dict=case)
embed = await self.embed_factory('case', interaction=interaction, case_dict=case)
await interaction.response.send_message(embed=embed, ephemeral=ephemeral)
else:
await interaction.response.send_message(content=f"No case with case number `{case_number}` found.", ephemeral=True)