fix(moderation): awaited coroutines

This commit is contained in:
SeaswimmerTheFsh 2023-12-15 13:56:22 -05:00
parent 4401b0419e
commit 16bd2f70de
Signed by untrusted user: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -282,7 +282,7 @@ class Moderation(commands.Cog):
await interaction.response.send_message(f"I do not have the `{permissions}` permission, required for this action.", ephemeral=True)
return False
if self.config.guild(interaction.guild).use_discord_permissions() is True:
if await self.config.guild(interaction.guild).use_discord_permissions() is True:
if self.check_permissions(interaction.user, permissions, guild=interaction.guild):
await interaction.response.send_message(f"You do not have the `{permissions}` permission, required for this action.", ephemeral=True)
return False
@ -304,7 +304,7 @@ class Moderation(commands.Cog):
await interaction.response.send_message(content="You cannot moderate members with a role higher than the bot!", ephemeral=True)
return False
immune_roles = self.config.guild(target.guild).immune_roles()
immune_roles = await self.config.guild(target.guild).immune_roles()
for role in target.roles:
if role.id in immune_roles: