diff --git a/redbot/cogs/mod/kickban.py b/redbot/cogs/mod/kickban.py index a4c186ead8e..daf24eadbd1 100644 --- a/redbot/cogs/mod/kickban.py +++ b/redbot/cogs/mod/kickban.py @@ -117,8 +117,8 @@ async def ban_user( removed_temp = False - if await self.config.guild(guild).mod_reason(): - if reason is None: + if reason is None: + if await self.config.guild(guild).mod_reason(): return False, _("You must provide a reason for the ban.") if not (0 <= days <= 7): @@ -307,8 +307,8 @@ async def kick(self, ctx: commands.Context, member: discord.Member, *, reason: s author = ctx.author guild = ctx.guild - if await self.config.guild(guild).mod_reason(): - if reason is None: + if reason is None: + if await self.config.guild(guild).mod_reason(): await ctx.send(_("You must provide a reason for the kick.")) return @@ -437,8 +437,8 @@ async def massban( errors = {} upgrades = [] - if await self.config.guild(ctx.guild).mod_reason(): - if reason is None: + if reason is None: + if await self.config.guild(ctx.guild).mod_reason(): await ctx.send(_("You must provide a reason for the massban.")) return @@ -619,8 +619,8 @@ async def tempban( guild = ctx.guild author = ctx.author - if await self.config.guild(guild).mod_reason(): - if reason is None: + if reason is None: + if await self.config.guild(guild).mod_reason(): await ctx.send(_("You must provide a reason for the tempban.")) return @@ -703,8 +703,8 @@ async def softban(self, ctx: commands.Context, member: discord.Member, *, reason guild = ctx.guild author = ctx.author - if await self.config.guild(guild).mod_reason(): - if reason is None: + if reason is None: + if await self.config.guild(guild).mod_reason(): await ctx.send(_("You must provide a reason for the softban.")) return @@ -795,8 +795,8 @@ async def voicekick( self, ctx: commands.Context, member: discord.Member, *, reason: str = None ): """Kick a member from a voice channel.""" - if await self.config.guild(ctx.guild).mod_reason(): - if reason is None: + if reason is None: + if await self.config.guild(ctx.guild).mod_reason(): await ctx.send(_("You must provide a reason for the voicekick.")) return @@ -847,8 +847,8 @@ async def voiceunban( self, ctx: commands.Context, member: discord.Member, *, reason: str = None ): """Unban a user from speaking and listening in the server's voice channels.""" - if await self.config.guild(ctx.guild).mod_reason(): - if reason is None: + if reason is None: + if await self.config.guild(ctx.guild).mod_reason(): await ctx.send(_("You must provide a reason for the voiceunban.")) return @@ -893,8 +893,8 @@ async def voiceunban( @commands.admin_or_permissions(mute_members=True, deafen_members=True) async def voiceban(self, ctx: commands.Context, member: discord.Member, *, reason: str = None): """Ban a user from speaking and listening in the server's voice channels.""" - if await self.config.guild(ctx.guild).mod_reason(): - if reason is None: + if reason is None: + if await self.config.guild(ctx.guild).mod_reason(): await ctx.send(_("You must provide a reason for the voiceban.")) return @@ -947,8 +947,8 @@ async def unban( 1. Copy it from the mod log case (if one was created), or 2. Enable Developer Mode, go to Bans in this server's settings, right-click the user and select 'Copy ID'. """ - if await self.config.guild(ctx.guild).mod_reason(): - if reason is None: + if reason is None: + if await self.config.guild(ctx.guild).mod_reason(): await ctx.send(_("You must provide a reason for the unban.")) return