fix (rooms): Fix order of checks in rent.
This commit is contained in:
@@ -134,17 +134,17 @@ async def cmd_rent(ctx):
|
|||||||
if ctx.args:
|
if ctx.args:
|
||||||
# Rent a new room
|
# 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 = (
|
to_add = (
|
||||||
member for member in ctx.msg.mentions if member != ctx.author
|
member for member in ctx.msg.mentions if member != ctx.author
|
||||||
)
|
)
|
||||||
to_add = list(set(to_add))
|
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
|
# Check that they didn't provide too many members
|
||||||
limit = ctx.guild_settings.rent_member_limit.value
|
limit = ctx.guild_settings.rent_member_limit.value
|
||||||
if len(ctx.msg.mentions) > limit:
|
if len(ctx.msg.mentions) > limit:
|
||||||
|
|||||||
Reference in New Issue
Block a user