fix whois issue
parent
945010a955
commit
893a712f7a
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue