add pin to embed for soft/hard reports

pull/29/head
Matthew 2020-09-20 15:29:25 -04:00
parent e1e74515f3
commit fa4e228571
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 4 additions and 1 deletions

View File

@ -154,8 +154,11 @@ export default class Score extends Command {
} else {
embed.setFooter(this.client.user.username, this.client.user.avatarURL);
}
if (args[1] === 'hard' && this.checkCustomPermissions(this.client.util.resolveMember(message.author.id, this.mainGuild), 6)) {
// eslint-disable-next-line no-mixed-operators
if ((args[1] === 'hard' || args[1] === 'soft') && this.checkCustomPermissions(this.client.util.resolveMember(message.author.id, this.mainGuild), 6)) {
if (score.pin?.length > 0) embed.addField('PIN', score.pin.join('-'), true);
}
if (args[1] === 'hard' && this.checkCustomPermissions(this.client.util.resolveMember(message.author.id, this.mainGuild), 6)) {
await message.channel.createMessage({ embed });
await message.channel.createMessage('***===BEGIN ADDITIONAL INFORMATION===***');
await this.client.commands.get('whois').run(message, [user.id]);