fix whois issue

merge-requests/6/merge
Matthew 2020-06-16 19:43:08 -04:00
parent 945010a955
commit 893a712f7a
No known key found for this signature in database
GPG Key ID: F841AB9BF496C194
1 changed files with 2 additions and 2 deletions

View File

@ -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) {