From 2178d7726383a4c472ef576f67f7b1a18ad1e827 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Tue, 27 Oct 2020 19:34:26 -0400 Subject: [PATCH] fix --- src/commands/whois.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/whois.ts b/src/commands/whois.ts index c627d64..30fc824 100644 --- a/src/commands/whois.ts +++ b/src/commands/whois.ts @@ -85,7 +85,7 @@ export default class Whois extends Command { embed.addField('Tier', String(account.tier), true); embed.addField('Support Key', account.supportKey, true); embed.addField('Referral Code & Total', `${account.referralCode} | ${account.totalReferrals}`, true); - embed.addField('Created By', `<@${this.client.users.get(account.createdBy).id}>`, true); + embed.addField('Created By', this.client.users.get(account.createdBy) ? `<@${this.client.users.get(account.createdBy).id}>` : 'SYSTEM', true); embed.addField('Created At', moment(account.createdAt).format('dddd, MMMM Do YYYY, h:mm:ss A'), true); embed.addField('CPU Usage', `${cpuUsage.split('\n')[0] || '0'}%`, true); embed.addField('Memory', dataConversion(Number(memory) * 1000), true); @@ -102,7 +102,7 @@ export default class Whois extends Command { embed.addField('Username', `${account.username} | <@${account.userID}>`, true); embed.addField('ID', account.userID, true); embed.addField('Tier', String(account.tier), true); - embed.addField('Created By', `<@${this.client.users.get(account.createdBy).id}>`, true); + embed.addField('Created By', this.client.users.get(account.createdBy) ? `<@${this.client.users.get(account.createdBy).id}>` : 'SYSTEM', true); embed.addField('Created At', moment(account.createdAt).format('dddd, MMMM Do YYYY, h:mm:ss A'), true); embed.addField('CPU Usage', `${cpuUsage.split('\n')[0] || '0'}%`, true); embed.addField('Memory', dataConversion(Number(memory) * 1000), true);