From d0214d8eef8adc86b2af83aab044ad7295a01278 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Fri, 4 Jun 2021 23:13:58 -0400 Subject: [PATCH] fixes --- src/commands/sss_create_account.ts | 8 +++++++- src/commands/sss_password_reset.ts | 2 +- src/intervals/departmentPager.ts | 18 ++++++++++++------ types/index.d.ts | 1 + 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/commands/sss_create_account.ts b/src/commands/sss_create_account.ts index d0f4e45..06b060b 100644 --- a/src/commands/sss_create_account.ts +++ b/src/commands/sss_create_account.ts @@ -32,6 +32,7 @@ export default class SSS_Create_Account extends Command { boardOfDirectors: true, }, picture: message.author.avatarURL, + password: this.client.config.defaultAccountPassword, }); } else if (message.member.roles.includes('701454855952138300')) { // Supervisor await this.client.util.authClient.createUser({ @@ -44,6 +45,7 @@ export default class SSS_Create_Account extends Command { supervisor: true, }, picture: message.author.avatarURL, + password: this.client.config.defaultAccountPassword, }); } else if (message.member.roles.includes('701454780828221450')) { // Technician await this.client.util.authClient.createUser({ @@ -56,6 +58,7 @@ export default class SSS_Create_Account extends Command { technician: true, }, picture: message.author.avatarURL, + password: this.client.config.defaultAccountPassword, }); } else if (message.member.roles.includes('455972169449734144')) { // Moderator await this.client.util.authClient.createUser({ @@ -68,6 +71,7 @@ export default class SSS_Create_Account extends Command { moderator: true, }, picture: message.author.avatarURL, + password: this.client.config.defaultAccountPassword, }); } else if (message.member.roles.includes('453689940140883988')) { // Core Team await this.client.util.authClient.createUser({ @@ -80,6 +84,7 @@ export default class SSS_Create_Account extends Command { coreTeam: true, }, picture: message.author.avatarURL, + password: this.client.config.defaultAccountPassword, }); } else if (message.member.roles.includes('701481967149121627')) { // Associates await this.client.util.authClient.createUser({ @@ -92,6 +97,7 @@ export default class SSS_Create_Account extends Command { associate: true, }, picture: message.author.avatarURL, + password: this.client.config.defaultAccountPassword, }); } @@ -100,7 +106,7 @@ export default class SSS_Create_Account extends Command { connection_id: 'con_T3ELEx2reigKMSlP', }); const channel = await this.client.getDMChannel(message.author.id); - channel.createMessage(`__**Library of Code sp-us | Identity Access Management**__\n\nPlease click the link below to reset your password.\n\n${passwordTicket.ticket}`).catch(() => this.error(message.channel, 'Unable to send you a DM.')); + channel.createMessage(`__**Library of Code sp-us | Identity & Account Management**__\n\nPlease click the link below to reset your password.\n\n${passwordTicket.ticket}`).catch(() => this.error(message.channel, 'Unable to send you a DM.')); return message.addReaction('modSuccess:578750988907970567'); } catch (err) { return this.client.util.handleError(err, message, this); diff --git a/src/commands/sss_password_reset.ts b/src/commands/sss_password_reset.ts index 535aab0..9484a6f 100644 --- a/src/commands/sss_password_reset.ts +++ b/src/commands/sss_password_reset.ts @@ -25,7 +25,7 @@ export default class SSS_Password_Reset extends Command { connection_id: 'con_T3ELEx2reigKMSlP', }); const channel = await this.client.getDMChannel(message.author.id); - channel.createMessage(`__**Library of Code sp-us | Identity Access Management**__\n\nPlease click the link below to reset your password.\n\n${passwordTicket.ticket}`).catch(() => this.error(message.channel, 'Unable to send you a DM.')); + channel.createMessage(`__**Library of Code sp-us | Identity & Account Management**__\n\nPlease click the link below to reset your password.\n\n${passwordTicket.ticket}`).catch(() => this.error(message.channel, 'Unable to send you a DM.')); return message.addReaction('modSuccess:578750988907970567'); } catch (err) { return this.client.util.handleError(err, message, this); diff --git a/src/intervals/departmentPager.ts b/src/intervals/departmentPager.ts index 7fbcca3..a98d555 100644 --- a/src/intervals/departmentPager.ts +++ b/src/intervals/departmentPager.ts @@ -165,6 +165,7 @@ 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 Access Management**__\n__Reset Password__\n\nPlease click on the link below to change your IAM password.\n${passwordTicket.ticket}`); + 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 @@ -206,6 +207,7 @@ 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 Access Management**__\n__Reset Password__\n\nPlease click on the link below to change your IAM password.\n${passwordTicket.ticket}`); + 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 @@ -248,6 +250,7 @@ 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 Access Management**__\n__Reset Password__\n\nPlease click on the link below to change your IAM password.\n${passwordTicket.ticket}`); + 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 @@ -290,6 +293,7 @@ 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 Access Management**__\n__Reset Password__\n\nPlease click on the link below to change your IAM password.\n${passwordTicket.ticket}`); + 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 @@ -332,6 +336,7 @@ 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 Access Management**__\n__Reset Password__\n\nPlease click on the link below to change your IAM password.\n${passwordTicket.ticket}`); + 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 @@ -374,6 +379,7 @@ 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 Access Management**__\n__Reset Password__\n\nPlease click on the link below to change your IAM password.\n${passwordTicket.ticket}`); + 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}`); }); } } diff --git a/types/index.d.ts b/types/index.d.ts index 4fab9d1..6d5ffd4 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -13,4 +13,5 @@ export declare interface Config { amiClientKey: string; auth0ClientID: string; auth0ClientSecret: string; + defaultAccountPassword: string; }