pager fixes
parent
842efb4f46
commit
e54c89231a
|
@ -75,9 +75,9 @@ function logNewPager(client: Client, num: string, member: Member): void {
|
||||||
channel.createMessage(`__**'${member.user.username}#${member.user.discriminator}' assigned to pager number '${num}'.**__`);
|
channel.createMessage(`__**'${member.user.username}#${member.user.discriminator}' assigned to pager number '${num}'.**__`);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function departmentPager(client: Client): Promise<NodeJS.Timeout> {
|
export default async function departmentPager(client0: Client): Promise<NodeJS.Timeout> {
|
||||||
setupDepartmentCodes(client);
|
setupDepartmentCodes(client0);
|
||||||
async function start() {
|
async function start(client: Client) {
|
||||||
const acknowledgements = require(`${__dirname}/../configs/acknowledgements.json`);
|
const acknowledgements = require(`${__dirname}/../configs/acknowledgements.json`);
|
||||||
function resolveStaffInformation(id: string) {
|
function resolveStaffInformation(id: string) {
|
||||||
return acknowledgements.find((m) => m.id === id);
|
return acknowledgements.find((m) => m.id === id);
|
||||||
|
@ -368,13 +368,13 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
client.util.signale.time('pagerint');
|
client0.util.signale.time('pagerint');
|
||||||
await start();
|
await start(client0);
|
||||||
client.util.signale.timeEnd('pagerint');
|
client0.util.signale.timeEnd('pagerint');
|
||||||
interval = setInterval(async () => {
|
interval = setInterval(async () => {
|
||||||
client.util.signale.time('pagerint');
|
client0.util.signale.time('pagerint');
|
||||||
await start();
|
await start(client0);
|
||||||
client.util.signale.timeEnd('pagerint');
|
client0.util.signale.timeEnd('pagerint');
|
||||||
}, 300000);
|
}, 300000);
|
||||||
return interval;
|
return interval;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue