fix await issue in whois

merge-requests/1/merge
Matthew 2019-11-09 23:34:19 -05:00
parent e40d8fe47f
commit 0c55303505
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ export default class Whois extends Command {
const cpuUsage = await this.client.util.exec(`top -b -n 1 -u ${account.username} | awk 'NR>7 { sum += $9; } END { print sum; }'`); const cpuUsage = await this.client.util.exec(`top -b -n 1 -u ${account.username} | awk 'NR>7 { sum += $9; } END { print sum; }'`);
embed.addField('CPU Usage', `${cpuUsage.split('\n')[0]}%`, true); embed.addField('CPU Usage', `${cpuUsage.split('\n')[0]}%`, true);
embed.addField('Memory', dataConversion(Number(await this.client.util.exec(`memory ${account.username}`))), true); embed.addField('Memory', dataConversion(Number(await this.client.util.exec(`memory ${account.username}`))), true);
const data = await this.client.redis.get(`storage-${account.username}`) ? dataConversion(Number(this.client.redis.get(`storage-${account.username}`))) : 'N/A'; const data = await this.client.redis.get(`storage-${account.username}`) ? dataConversion(Number(await this.client.redis.get(`storage-${account.username}`))) : 'N/A';
embed.addField('Storage', data, true); embed.addField('Storage', data, true);
let details = ''; let details = '';
if (account.locked) details += 'This account is currently locked.\n'; if (account.locked) details += 'This account is currently locked.\n';