merge-requests/4/head
Matthew 2020-11-07 04:51:40 -05:00
parent ccc322fd33
commit b23f5f5418
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 4 additions and 8 deletions

View File

@ -20,8 +20,7 @@ export default class Users extends Command {
const accounts = await this.client.db.Account.find().lean().exec(); const accounts = await this.client.db.Account.find().lean().exec();
if (!args[0]) { if (!args[0]) {
for (const account of accounts) { for (const account of accounts) {
const fingerInformation = await this.client.util.exec(`finger ${account.username}`); embedFields.push({ name: `${account.username}`, value: `<@${account.userID}>\nTier: ${account.tier} | Email Address: ${account.emailAddress}${account.locked ? ' | Locked: true' : ''}` });
embedFields.push({ name: `${account.username}`, value: `<@${account.userID}>\n${fingerInformation}\nTier: ${account.tier} | Email Address: ${account.emailAddress}${account.locked ? ' | Locked: true' : ''}` });
} }
} else { } else {
switch (args[0]) { switch (args[0]) {
@ -29,20 +28,17 @@ export default class Users extends Command {
return msg.edit(`***${this.client.stores.emojis.error} Invalid filter option.***`); return msg.edit(`***${this.client.stores.emojis.error} Invalid filter option.***`);
case 't1': case 't1':
for (const account of accounts.filter((a) => a.tier === 1)) { for (const account of accounts.filter((a) => a.tier === 1)) {
const fingerInformation = await this.client.util.exec(`finger ${account.username}`); embedFields.push({ name: `${account.username}`, value: `<@${account.userID}>\nTier: ${account.tier} | Email Address: ${account.emailAddress}${account.locked ? ' | Locked: true' : ''}` });
embedFields.push({ name: `${account.username}`, value: `<@${account.userID}>\n${fingerInformation}\nTier: ${account.tier} | Email Address: ${account.emailAddress}${account.locked ? ' | Locked: true' : ''}` });
} }
break; break;
case 't2': case 't2':
for (const account of accounts.filter((a) => a.tier === 2)) { for (const account of accounts.filter((a) => a.tier === 2)) {
const fingerInformation = await this.client.util.exec(`finger ${account.username}`); embedFields.push({ name: `${account.username}`, value: `<@${account.userID}>\nTier: ${account.tier} | Email Address: ${account.emailAddress}${account.locked ? ' | Locked: true' : ''}` });
embedFields.push({ name: `${account.username}`, value: `<@${account.userID}>\n${fingerInformation}\nTier: ${account.tier} | Email Address: ${account.emailAddress}${account.locked ? ' | Locked: true' : ''}` });
} }
break; break;
case 't3': case 't3':
for (const account of accounts.filter((a) => a.tier === 3)) { for (const account of accounts.filter((a) => a.tier === 3)) {
const fingerInformation = await this.client.util.exec(`finger ${account.username}`); embedFields.push({ name: `${account.username}`, value: `<@${account.userID}>\nTier: ${account.tier} | Email Address: ${account.emailAddress}${account.locked ? ' | Locked: true' : ''}` });
embedFields.push({ name: `${account.username}`, value: `<@${account.userID}>\n${fingerInformation}\nTier: ${account.tier} | Email Address: ${account.emailAddress}${account.locked ? ' | Locked: true' : ''}` });
} }
break; break;
} }