From 0f845a5f171d0ab3dbea57bfa4cd55fc7c2c904a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= Date: Sun, 9 Sep 2018 20:33:34 +0200 Subject: [PATCH] Restored like it was before --- commands/admin/assignrank.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/commands/admin/assignrank.js b/commands/admin/assignrank.js index d1c53a54..cf25336f 100644 --- a/commands/admin/assignrank.js +++ b/commands/admin/assignrank.js @@ -7,6 +7,7 @@ module.exports = class GAssignRankCommand extends Command { memberName: 'Assignrank', description: 'Assign a rank to the mentionned user', clientPermissions: ['MANAGE_ROLES'], + userPermissions: ['MANAGE_ROLES'], guildOnly: true, args: [ { @@ -26,12 +27,9 @@ module.exports = class GAssignRankCommand extends Command { run(message, { rank, member }) { const role = message.guild.roles.find('name', rank); member = message.mentions.members.first(); - if (!message.mentions.users.size) { - return message.channel.send(`You succesfully gived the rank **${rank}** to yourself: ${message.author.addRole(role)}`); - } if (!role) { message.say("The rank you tried to assign dosent exist ( or bot have a lower rank than the one you tried to assign"); - } else if (userPermissions = 'MANAGE_ROLES') + } else member.addRole(role); message.say(`You successfully gived the rank **${rank}** to **${member}**`); }