diff --git a/src/intervals/departmentPager.ts b/src/intervals/departmentPager.ts index bc85e6e..1878246 100644 --- a/src/intervals/departmentPager.ts +++ b/src/intervals/departmentPager.ts @@ -155,27 +155,30 @@ export default async function departmentPager(client: Client): Promise { + chan.createMessage(`__**Pager Number Creation**__\nYour individual pager number has been automatically created. Your number (PN) is ${randomPagerNumber}.`); + chan.createMessage(`__**Library of Code sp-us | Identity & Account Management**__\n__Reset Password__\n\nPlease click on the link below to change your IAM password.\n${passwordTicket.ticket}`); + }); + } + logNewPager(client, randomPagerNumber, member); - client.getDMChannel(member.id).then((chan) => { - chan.createMessage(`__**Pager Number Creation**__\nYour individual pager number has been automatically created. Your number (PN) is ${randomPagerNumber}.`); - chan.createMessage(`__**Library of Code sp-us | Identity & Account Management**__\n__Reset Password__\n\nPlease click on the link below to change your IAM password.\n${passwordTicket.ticket}`); - }); } else if (!pager && member.roles.includes('701454855952138300')) { // Supervisors let randomPagerNumber: string; @@ -197,27 +200,30 @@ export default async function departmentPager(client: Client): Promise { + chan.createMessage(`__**Pager Number Creation**__\nYour individual pager number has been automatically created. Your number (PN) is ${randomPagerNumber}.`); + chan.createMessage(`__**Library of Code sp-us | Identity & Account Management**__\n__Reset Password__\n\nPlease click on the link below to change your IAM password.\n${passwordTicket.ticket}`); + }); + } + logNewPager(client, randomPagerNumber, member); - client.getDMChannel(member.id).then((chan) => { - chan.createMessage(`__**Pager Number Creation**__\nYour individual pager number has been automatically created. Your number (PN) is ${randomPagerNumber}.`); - chan.createMessage(`__**Library of Code sp-us | Identity & Account Management**__\n__Reset Password__\n\nPlease click on the link below to change your IAM password.\n${passwordTicket.ticket}`); - }); } else if (!pager && member.roles.includes('701454780828221450')) { // Technicians let randomPagerNumber: string; @@ -240,27 +246,30 @@ export default async function departmentPager(client: Client): Promise { + chan.createMessage(`__**Pager Number Creation**__\nYour individual pager number has been automatically created. Your number (PN) is ${randomPagerNumber}.`); + chan.createMessage(`__**Library of Code sp-us | Identity & Account Management**__\n__Reset Password__\n\nPlease click on the link below to change your IAM password.\n${passwordTicket.ticket}`); + }); + } + logNewPager(client, randomPagerNumber, member); - client.getDMChannel(member.id).then((chan) => { - chan.createMessage(`__**Pager Number Creation**__\nYour individual pager number has been automatically created. Your number (PN) is ${randomPagerNumber}.`); - chan.createMessage(`__**Library of Code sp-us | Identity & Account Management**__\n__Reset Password__\n\nPlease click on the link below to change your IAM password.\n${passwordTicket.ticket}`); - }); } else if (!pager && member.roles.includes('455972169449734144')) { // Moderators let randomPagerNumber: string; @@ -283,27 +292,30 @@ export default async function departmentPager(client: Client): Promise { + chan.createMessage(`__**Pager Number Creation**__\nYour individual pager number has been automatically created. Your number (PN) is ${randomPagerNumber}.`); + chan.createMessage(`__**Library of Code sp-us | Identity & Account Management**__\n__Reset Password__\n\nPlease click on the link below to change your IAM password.\n${passwordTicket.ticket}`); + }); + } + logNewPager(client, randomPagerNumber, member); - client.getDMChannel(member.id).then((chan) => { - chan.createMessage(`__**Pager Number Creation**__\nYour individual pager number has been automatically created. Your number (PN) is ${randomPagerNumber}.`); - chan.createMessage(`__**Library of Code sp-us | Identity & Account Management**__\n__Reset Password__\n\nPlease click on the link below to change your IAM password.\n${passwordTicket.ticket}`); - }); } else if (!pager && member.roles.includes('453689940140883988')) { // Core Team let randomPagerNumber: string; @@ -326,27 +338,30 @@ export default async function departmentPager(client: Client): Promise { + chan.createMessage(`__**Pager Number Creation**__\nYour individual pager number has been automatically created. Your number (PN) is ${randomPagerNumber}.`); + chan.createMessage(`__**Library of Code sp-us | Identity & Account Management**__\n__Reset Password__\n\nPlease click on the link below to change your IAM password.\n${passwordTicket.ticket}`); + }); + } + logNewPager(client, randomPagerNumber, member); - client.getDMChannel(member.id).then((chan) => { - chan.createMessage(`__**Pager Number Creation**__\nYour individual pager number has been automatically created. Your number (PN) is ${randomPagerNumber}.`); - chan.createMessage(`__**Library of Code sp-us | Identity & Account Management**__\n__Reset Password__\n\nPlease click on the link below to change your IAM password.\n${passwordTicket.ticket}`); - }); } else if (!pager && member.roles.includes('701481967149121627')) { // Associates let randomPagerNumber: string; @@ -369,27 +384,30 @@ export default async function departmentPager(client: Client): Promise { + chan.createMessage(`__**Pager Number Creation**__\nYour individual pager number has been automatically created. Your number (PN) is ${randomPagerNumber}.`); + chan.createMessage(`__**Library of Code sp-us | Identity & Account Management**__\n__Reset Password__\n\nPlease click on the link below to change your IAM password.\n${passwordTicket.ticket}`); + }); + } + logNewPager(client, randomPagerNumber, member); - client.getDMChannel(member.id).then((chan) => { - chan.createMessage(`__**Pager Number Creation**__\nYour individual pager number has been automatically created. Your number (PN) is ${randomPagerNumber}.`); - chan.createMessage(`__**Library of Code sp-us | Identity & Account Management**__\n__Reset Password__\n\nPlease click on the link below to change your IAM password.\n${passwordTicket.ticket}`); - }); } }