pager fixes

merge-requests/15/head
Matthew 2020-07-19 20:20:53 -04:00
parent 4b2de2175c
commit ebd1a3ab24
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 1 additions and 2 deletions

View File

@ -84,7 +84,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
return acknowledgements.find((m) => m.id === id);
}
await client.guilds.get(client.config.guildID).fetchAllMembers();
const members = client.guilds.get(client.config.guildID).members.values();
const members = client.guilds.get(client.config.guildID).members.map((m) => m);
for (const member of members) {
const pager = await client.db.PagerNumber.findOne({ individualAssignID: member.id }).lean().exec();
@ -115,7 +115,6 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
}
}
// const takenPagers = new Set<string>();
for (const member of members) {
let pager = await client.db.PagerNumber.findOne({ individualAssignID: member.id }).lean().exec();
// Directors