diff --git a/src/commands/whois.ts b/src/commands/whois.ts index 1aba0e5..4717875 100644 --- a/src/commands/whois.ts +++ b/src/commands/whois.ts @@ -47,7 +47,7 @@ export default class Whois extends Command { if (ackResolve?.emailAddress) { description += `${emotes.email} ${ackResolve.emailAddress}\n`; } - const pager = await this.client.db.PagerNumber.findOne({ individualAssignID: member.user.id }); + const pager = await this.client.db.PagerNumber.findOne({ individualAssignID: member.user.id }).lean().exec(); if (pager?.num) { description += `📡 ${pager.num}\n`; } @@ -90,7 +90,7 @@ export default class Whois extends Command { if (bit & 1073741824) permissions.push('Manage Emojis'); 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 }); + const account = await this.client.db.Member.findOne({ userID: member.id }).lean().exec(); if (account?.additional?.langs.length > 0) { const langs: string[] = []; for (const lang of account.additional.langs.sort((a, b) => a.localeCompare(b))) {