From 893a712f7a8b8ecd45ab829d40b7f251ad8c7056 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Tue, 16 Jun 2020 19:43:08 -0400 Subject: [PATCH] fix whois issue --- 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 4717875..08e0018 100644 --- a/src/commands/whois.ts +++ b/src/commands/whois.ts @@ -91,7 +91,7 @@ export default class Whois extends Command { if (bit & 4) permissions.push('Ban Members'); if (bit & 2) permissions.push('Kick Members'); const account = await this.client.db.Member.findOne({ userID: member.id }).lean().exec(); - if (account?.additional?.langs.length > 0) { + if (account?.additional?.langs?.length > 0) { const langs: string[] = []; for (const lang of account.additional.langs.sort((a, b) => a.localeCompare(b))) { switch (lang) { @@ -137,7 +137,7 @@ export default class Whois extends Command { } embed.addField('Known Languages', langs.join(', ')); } - if (account?.additional?.operatingSystems.length > 0) { + if (account?.additional?.operatingSystems?.length > 0) { const operatingSystems: string[] = []; for (const os of account.additional.operatingSystems.sort((a, b) => a.localeCompare(b))) { switch (os) {