fixes to rank cmd
parent
cd4805dbae
commit
b8fdce83d9
|
@ -36,7 +36,7 @@ export default class Rank extends Command {
|
||||||
embed.setTimestamp();
|
embed.setTimestamp();
|
||||||
return message.channel.createMessage({ embed });
|
return message.channel.createMessage({ embed });
|
||||||
}
|
}
|
||||||
const role = this.client.util.resolveRole(args[0], this.client.guilds.get(this.client.config.guildID));
|
const role = this.client.util.resolveRole(args.join(' '), this.client.guilds.get(this.client.config.guildID));
|
||||||
if (!role) return this.error(message.channel, 'The role you specified doesn\'t exist.');
|
if (!role) return this.error(message.channel, 'The role you specified doesn\'t exist.');
|
||||||
const entry = await this.client.db.Rank.findOne({ roleID: role.id }).lean().exec();
|
const entry = await this.client.db.Rank.findOne({ roleID: role.id }).lean().exec();
|
||||||
if (!entry) return this.error(message.channel, 'The rank you specified doesn\'t exist.');
|
if (!entry) return this.error(message.channel, 'The rank you specified doesn\'t exist.');
|
||||||
|
|
Loading…
Reference in New Issue