fix blocklist
This commit is contained in:
parent
f045364134
commit
663ba0b38f
1 changed files with 5 additions and 7 deletions
|
@ -25,13 +25,11 @@ module.exports = class {
|
|||
list.push(`${user.username}#${user.discriminator}`);
|
||||
}
|
||||
|
||||
let description = 'The server blocklist is currently empty. Use `blocklist add <user>` to add people to the blocklist!';
|
||||
|
||||
if (list.length > 0) description = '```' + list.join(', ') + '```';
|
||||
if (list.length === 0) return message.channel.createMessage('The server blocklist is currently empty. Use `blocklist add <user>` to add people to the blocklist!');
|
||||
|
||||
const embed = new Embed()
|
||||
.setTitle('Users on blocklist: ' + data.guild.blocklist.length)
|
||||
.setDescription(description)
|
||||
.setDescription('```' + list.join(', ') + '```')
|
||||
.setColor('PINK');
|
||||
|
||||
message.channel.createMessage({ embed: embed });
|
||||
|
@ -39,7 +37,7 @@ module.exports = class {
|
|||
return;
|
||||
}
|
||||
|
||||
if (user.length === 0) return message.channel.createMessage(
|
||||
if (!user) return message.channel.createMessage(
|
||||
`${client.constants.emojis.userError} You didn't specify a user. Usage: \`${this.help.usage}\``
|
||||
);
|
||||
|
||||
|
@ -51,10 +49,10 @@ module.exports = class {
|
|||
`${client.constants.emojis.userError} Found more than one user, try refining your search or pinging the user instead.`
|
||||
);
|
||||
|
||||
member = message.channel.guild.members.get(member.id);
|
||||
|
||||
action = action.toLowerCase();
|
||||
|
||||
member = member[0];
|
||||
|
||||
const blocklist = data.guild.blocklist;
|
||||
|
||||
if (action === 'add') {
|
||||
|
|
Loading…
Reference in a new issue