From 5dd0d53e3ee468c13e44880de8fbd2e733f54667 Mon Sep 17 00:00:00 2001 From: sco1 Date: Wed, 9 Jan 2019 16:53:49 -0500 Subject: Add missing awaits --- bot/cogs/moderation.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bot/cogs/moderation.py b/bot/cogs/moderation.py index 057b51bbf..1db7df3dd 100644 --- a/bot/cogs/moderation.py +++ b/bot/cogs/moderation.py @@ -125,7 +125,7 @@ class Moderation(Scheduler): :param reason: The reason for the kick. """ - if not self.respect_role_hierarchy(ctx, user, 'kick'): + if not await self.respect_role_hierarchy(ctx, user, 'kick'): # Ensure ctx author has a higher top role than the target user # Warning is sent to ctx by the helper method return @@ -176,7 +176,7 @@ class Moderation(Scheduler): :param reason: The reason for the ban. """ - if not self.respect_role_hierarchy(ctx, user, 'ban'): + if not await self.respect_role_hierarchy(ctx, user, 'ban'): # Ensure ctx author has a higher top role than the target user # Warning is sent to ctx by the helper method return @@ -337,7 +337,7 @@ class Moderation(Scheduler): :param reason: The reason for the temporary ban. """ - if not self.respect_role_hierarchy(ctx, user, 'tempban'): + if not await self.respect_role_hierarchy(ctx, user, 'tempban'): # Ensure ctx author has a higher top role than the target user # Warning is sent to ctx by the helper method return @@ -435,7 +435,7 @@ class Moderation(Scheduler): :param reason: The reason for the kick. """ - if not self.respect_role_hierarchy(ctx, user, 'shadowkick'): + if not await self.respect_role_hierarchy(ctx, user, 'shadowkick'): # Ensure ctx author has a higher top role than the target user # Warning is sent to ctx by the helper method return @@ -476,7 +476,7 @@ class Moderation(Scheduler): :param reason: The reason for the ban. """ - if not self.respect_role_hierarchy(ctx, user, 'shadowban'): + if not await self.respect_role_hierarchy(ctx, user, 'shadowban'): # Ensure ctx author has a higher top role than the target user # Warning is sent to ctx by the helper method return @@ -606,7 +606,7 @@ class Moderation(Scheduler): :param reason: The reason for the temporary ban. """ - if not self.respect_role_hierarchy(ctx, user, 'shadowtempban'): + if not await self.respect_role_hierarchy(ctx, user, 'shadowtempban'): # Ensure ctx author has a higher top role than the target user # Warning is sent to ctx by the helper method return @@ -1257,7 +1257,7 @@ class Moderation(Scheduler): f"{actor.display_name} ({actor.id}) attempted to {infraction_type} " f"{target.display_name} ({target.id}), who has a higher top role" ) - ctx.send(f":x: {actor.mention}, you may not {infraction_type} someone with a higher top role") + await ctx.send(f":x: {actor.mention}, you may not {infraction_type} someone with a higher top role") return hierarchy_check -- cgit v1.2.3