From 40e7735a875a71635169129e93839c3c32fd9f6d Mon Sep 17 00:00:00 2001 From: Conatum Date: Mon, 20 Sep 2021 10:58:53 +0300 Subject: [PATCH] fix (rooms): Fix order of checks in `rent`. --- bot/modules/renting/commands.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bot/modules/renting/commands.py b/bot/modules/renting/commands.py index 8584cbdf..72b5c8f3 100644 --- a/bot/modules/renting/commands.py +++ b/bot/modules/renting/commands.py @@ -134,17 +134,17 @@ async def cmd_rent(ctx): if ctx.args: # Rent a new room - # Check that they provided at least one member - if not ctx.msg.mentions: - return await ctx.error_reply( - "Please mention at least one user to add to your new room." - ) - to_add = ( member for member in ctx.msg.mentions if member != ctx.author ) to_add = list(set(to_add)) + # Check that they provided at least one member + if not to_add: + return await ctx.error_reply( + "Please mention at least one user to add to your new room." + ) + # Check that they didn't provide too many members limit = ctx.guild_settings.rent_member_limit.value if len(ctx.msg.mentions) > limit: