lean whois db queries
parent
6522eadf19
commit
77f9ca0903
|
@ -47,7 +47,7 @@ export default class Whois extends Command {
|
||||||
if (ackResolve?.emailAddress) {
|
if (ackResolve?.emailAddress) {
|
||||||
description += `${emotes.email} ${ackResolve.emailAddress}\n`;
|
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) {
|
if (pager?.num) {
|
||||||
description += `📡 ${pager.num}\n`;
|
description += `📡 ${pager.num}\n`;
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ export default class Whois extends Command {
|
||||||
if (bit & 1073741824) permissions.push('Manage Emojis');
|
if (bit & 1073741824) permissions.push('Manage Emojis');
|
||||||
if (bit & 4) permissions.push('Ban Members');
|
if (bit & 4) permissions.push('Ban Members');
|
||||||
if (bit & 2) permissions.push('Kick 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) {
|
if (account?.additional?.langs.length > 0) {
|
||||||
const langs: string[] = [];
|
const langs: string[] = [];
|
||||||
for (const lang of account.additional.langs.sort((a, b) => a.localeCompare(b))) {
|
for (const lang of account.additional.langs.sort((a, b) => a.localeCompare(b))) {
|
||||||
|
|
Loading…
Reference in New Issue