From 97b22ef72b389697b70100af025f62bc7e3527d1 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Mon, 5 Jul 2021 23:53:59 -0400 Subject: [PATCH] attempt x2 fix --- src/intervals/departmentPager.ts | 258 +++++++++++++++++-------------- 1 file changed, 138 insertions(+), 120 deletions(-) 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}`); - }); } }