fixes to rank
parent
275dc39cb1
commit
ca14936a8d
|
@ -59,10 +59,10 @@ export default class Rank extends Command {
|
||||||
permCheck = entry.permissions.some((item) => message.member.roles.includes(item));
|
permCheck = entry.permissions.some((item) => message.member.roles.includes(item));
|
||||||
}
|
}
|
||||||
if (!permCheck) return this.error(message.channel, 'Permission denied.');
|
if (!permCheck) return this.error(message.channel, 'Permission denied.');
|
||||||
await message.member.addRole(entry.roleID, `User ${message.author.username}#${message.author.discriminator} self-assigned this role.`);
|
await message.member.addRole(entry.roleID, 'User self-assigned this role.');
|
||||||
this.success(message.channel, `You have self-assigned ${entry.name}.`);
|
this.success(message.channel, `You have self-assigned ${entry.name}.`);
|
||||||
} else if (message.member.roles.includes(entry.roleID)) {
|
} else if (message.member.roles.includes(entry.roleID)) {
|
||||||
await message.member.removeRole(entry.roleID, `User ${message.author.username}#${message.author.discriminator} has removed a self-assignable role.`);
|
await message.member.removeRole(entry.roleID, 'User has removed a self-assignable role.');
|
||||||
this.success(message.channel, `You have removed ${entry.name}.`);
|
this.success(message.channel, `You have removed ${entry.name}.`);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue