forked from cswimr/SeaCogs
fix(moderation): awaited coroutines
This commit is contained in:
parent
4401b0419e
commit
16bd2f70de
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
await interaction.response.send_message(f"I do not have the `{permissions}` permission, required for this action.", ephemeral=True)
|
||||||
return False
|
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):
|
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)
|
await interaction.response.send_message(f"You do not have the `{permissions}` permission, required for this action.", ephemeral=True)
|
||||||
return False
|
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)
|
await interaction.response.send_message(content="You cannot moderate members with a role higher than the bot!", ephemeral=True)
|
||||||
return False
|
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:
|
for role in target.roles:
|
||||||
if role.id in immune_roles:
|
if role.id in immune_roles:
|
||||||
|
|
Loading…
Reference in a new issue