diff --git a/commands/settings/addrole.js b/commands/settings/addrole.js index 1d828654..c9b6d0c1 100644 --- a/commands/settings/addrole.js +++ b/commands/settings/addrole.js @@ -22,7 +22,8 @@ module.exports = class AddRoleCommand extends Command { const { role } = args; const roles = msg.guild.settings.get('openRoles'); if (!roles) return msg.say('No Roles are open to join.'); - if (!roles.has(role.id)) return msg.say('This role is not open.'); + if (!roles.has(role.id)) return msg.say(`The ${role.name} role is not open.`); + if (msg.member.roles.has(role.id)) return msg.say(`You already have the ${role.name} role.`); msg.member.addRole(role); return msg.say(`You have been given the ${role.name} role.`); } diff --git a/commands/settings/openroles.js b/commands/settings/openroles.js index c810a935..14e1f9c6 100644 --- a/commands/settings/openroles.js +++ b/commands/settings/openroles.js @@ -36,7 +36,6 @@ module.exports = class OpenRolesCommand extends Command { const { action, role } = args; const roles = msg.guild.settings.get('openRoles', new Set()); if (action === 'add') { - console.log(roles); if (roles.size > 5) return msg.say('Only 5 roles may be open.'); if (roles.has(role.id)) return msg.say(`${role.name} is already set to open.`); roles.add(role.id); diff --git a/commands/settings/removerole.js b/commands/settings/removerole.js index fa849974..d5515113 100644 --- a/commands/settings/removerole.js +++ b/commands/settings/removerole.js @@ -22,7 +22,8 @@ module.exports = class RemoveRoleCommand extends Command { const { role } = args; const roles = msg.guild.settings.get('openRoles'); if (!roles) return msg.say('No Roles are open to join.'); - if (!roles.has(role.id)) return msg.say('This role is not open.'); + if (!roles.has(role.id)) return msg.say(`The ${role.name} role is not open.`); + if (!msg.member.roles.has(role.id)) return msg.say(`You do not have the ${role.name} role.`); msg.member.removeRole(role); return msg.say(`You have been removed from the ${role.name} role.`); }