If user is already muted, send error message to prevent database from screwing up

pull/8/head
sgoudham 4 years ago
parent 9bf6529c37
commit 046be93f9d

@ -123,6 +123,13 @@ async def mute_members(pool, ctx, targets, reason, muted):
""" """
for target in targets: for target in targets:
# When user is already muted, send error message
if muted in target.roles:
embed = Embed(description="**❌ User Is Already Muted! ❌**",
colour=enso_embedmod_colours)
await ctx.send(embed=embed)
else:
if (ctx.message.guild.me.top_role.position > target.top_role.position if (ctx.message.guild.me.top_role.position > target.top_role.position
and not target.guild_permissions.administrator): and not target.guild_permissions.administrator):

Loading…
Cancel
Save