fixes
parent
86b1bb621f
commit
d0214d8eef
|
@ -32,6 +32,7 @@ export default class SSS_Create_Account extends Command {
|
||||||
boardOfDirectors: true,
|
boardOfDirectors: true,
|
||||||
},
|
},
|
||||||
picture: message.author.avatarURL,
|
picture: message.author.avatarURL,
|
||||||
|
password: this.client.config.defaultAccountPassword,
|
||||||
});
|
});
|
||||||
} else if (message.member.roles.includes('701454855952138300')) { // Supervisor
|
} else if (message.member.roles.includes('701454855952138300')) { // Supervisor
|
||||||
await this.client.util.authClient.createUser({
|
await this.client.util.authClient.createUser({
|
||||||
|
@ -44,6 +45,7 @@ export default class SSS_Create_Account extends Command {
|
||||||
supervisor: true,
|
supervisor: true,
|
||||||
},
|
},
|
||||||
picture: message.author.avatarURL,
|
picture: message.author.avatarURL,
|
||||||
|
password: this.client.config.defaultAccountPassword,
|
||||||
});
|
});
|
||||||
} else if (message.member.roles.includes('701454780828221450')) { // Technician
|
} else if (message.member.roles.includes('701454780828221450')) { // Technician
|
||||||
await this.client.util.authClient.createUser({
|
await this.client.util.authClient.createUser({
|
||||||
|
@ -56,6 +58,7 @@ export default class SSS_Create_Account extends Command {
|
||||||
technician: true,
|
technician: true,
|
||||||
},
|
},
|
||||||
picture: message.author.avatarURL,
|
picture: message.author.avatarURL,
|
||||||
|
password: this.client.config.defaultAccountPassword,
|
||||||
});
|
});
|
||||||
} else if (message.member.roles.includes('455972169449734144')) { // Moderator
|
} else if (message.member.roles.includes('455972169449734144')) { // Moderator
|
||||||
await this.client.util.authClient.createUser({
|
await this.client.util.authClient.createUser({
|
||||||
|
@ -68,6 +71,7 @@ export default class SSS_Create_Account extends Command {
|
||||||
moderator: true,
|
moderator: true,
|
||||||
},
|
},
|
||||||
picture: message.author.avatarURL,
|
picture: message.author.avatarURL,
|
||||||
|
password: this.client.config.defaultAccountPassword,
|
||||||
});
|
});
|
||||||
} else if (message.member.roles.includes('453689940140883988')) { // Core Team
|
} else if (message.member.roles.includes('453689940140883988')) { // Core Team
|
||||||
await this.client.util.authClient.createUser({
|
await this.client.util.authClient.createUser({
|
||||||
|
@ -80,6 +84,7 @@ export default class SSS_Create_Account extends Command {
|
||||||
coreTeam: true,
|
coreTeam: true,
|
||||||
},
|
},
|
||||||
picture: message.author.avatarURL,
|
picture: message.author.avatarURL,
|
||||||
|
password: this.client.config.defaultAccountPassword,
|
||||||
});
|
});
|
||||||
} else if (message.member.roles.includes('701481967149121627')) { // Associates
|
} else if (message.member.roles.includes('701481967149121627')) { // Associates
|
||||||
await this.client.util.authClient.createUser({
|
await this.client.util.authClient.createUser({
|
||||||
|
@ -92,6 +97,7 @@ export default class SSS_Create_Account extends Command {
|
||||||
associate: true,
|
associate: true,
|
||||||
},
|
},
|
||||||
picture: message.author.avatarURL,
|
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',
|
connection_id: 'con_T3ELEx2reigKMSlP',
|
||||||
});
|
});
|
||||||
const channel = await this.client.getDMChannel(message.author.id);
|
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');
|
return message.addReaction('modSuccess:578750988907970567');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return this.client.util.handleError(err, message, this);
|
return this.client.util.handleError(err, message, this);
|
||||||
|
|
|
@ -25,7 +25,7 @@ export default class SSS_Password_Reset extends Command {
|
||||||
connection_id: 'con_T3ELEx2reigKMSlP',
|
connection_id: 'con_T3ELEx2reigKMSlP',
|
||||||
});
|
});
|
||||||
const channel = await this.client.getDMChannel(message.author.id);
|
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');
|
return message.addReaction('modSuccess:578750988907970567');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return this.client.util.handleError(err, message, this);
|
return this.client.util.handleError(err, message, this);
|
||||||
|
|
|
@ -165,6 +165,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
|
||||||
boardOfDirectors: true,
|
boardOfDirectors: true,
|
||||||
},
|
},
|
||||||
picture: member.avatarURL,
|
picture: member.avatarURL,
|
||||||
|
password: client.config.defaultAccountPassword,
|
||||||
});
|
});
|
||||||
const passwordTicket = await client.util.authClient.createPasswordChangeTicket({
|
const passwordTicket = await client.util.authClient.createPasswordChangeTicket({
|
||||||
email: acknowledgement.emailAddress,
|
email: acknowledgement.emailAddress,
|
||||||
|
@ -173,7 +174,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
|
||||||
logNewPager(client, randomPagerNumber, member);
|
logNewPager(client, randomPagerNumber, member);
|
||||||
client.getDMChannel(member.id).then((chan) => {
|
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(`__**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')) {
|
} else if (!pager && member.roles.includes('701454855952138300')) {
|
||||||
// Supervisors
|
// Supervisors
|
||||||
|
@ -206,6 +207,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
|
||||||
supervisor: true,
|
supervisor: true,
|
||||||
},
|
},
|
||||||
picture: member.avatarURL,
|
picture: member.avatarURL,
|
||||||
|
password: client.config.defaultAccountPassword,
|
||||||
});
|
});
|
||||||
const passwordTicket = await client.util.authClient.createPasswordChangeTicket({
|
const passwordTicket = await client.util.authClient.createPasswordChangeTicket({
|
||||||
email: acknowledgement.emailAddress,
|
email: acknowledgement.emailAddress,
|
||||||
|
@ -214,7 +216,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
|
||||||
logNewPager(client, randomPagerNumber, member);
|
logNewPager(client, randomPagerNumber, member);
|
||||||
client.getDMChannel(member.id).then((chan) => {
|
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(`__**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')) {
|
} else if (!pager && member.roles.includes('701454780828221450')) {
|
||||||
// Technicians
|
// Technicians
|
||||||
|
@ -248,6 +250,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
|
||||||
technician: true,
|
technician: true,
|
||||||
},
|
},
|
||||||
picture: member.avatarURL,
|
picture: member.avatarURL,
|
||||||
|
password: client.config.defaultAccountPassword,
|
||||||
});
|
});
|
||||||
const passwordTicket = await client.util.authClient.createPasswordChangeTicket({
|
const passwordTicket = await client.util.authClient.createPasswordChangeTicket({
|
||||||
email: acknowledgement.emailAddress,
|
email: acknowledgement.emailAddress,
|
||||||
|
@ -256,7 +259,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
|
||||||
logNewPager(client, randomPagerNumber, member);
|
logNewPager(client, randomPagerNumber, member);
|
||||||
client.getDMChannel(member.id).then((chan) => {
|
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(`__**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')) {
|
} else if (!pager && member.roles.includes('455972169449734144')) {
|
||||||
// Moderators
|
// Moderators
|
||||||
|
@ -290,6 +293,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
|
||||||
moderator: true,
|
moderator: true,
|
||||||
},
|
},
|
||||||
picture: member.avatarURL,
|
picture: member.avatarURL,
|
||||||
|
password: client.config.defaultAccountPassword,
|
||||||
});
|
});
|
||||||
const passwordTicket = await client.util.authClient.createPasswordChangeTicket({
|
const passwordTicket = await client.util.authClient.createPasswordChangeTicket({
|
||||||
email: acknowledgement.emailAddress,
|
email: acknowledgement.emailAddress,
|
||||||
|
@ -298,7 +302,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
|
||||||
logNewPager(client, randomPagerNumber, member);
|
logNewPager(client, randomPagerNumber, member);
|
||||||
client.getDMChannel(member.id).then((chan) => {
|
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(`__**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')) {
|
} else if (!pager && member.roles.includes('453689940140883988')) {
|
||||||
// Core Team
|
// Core Team
|
||||||
|
@ -332,6 +336,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
|
||||||
coreTeam: true,
|
coreTeam: true,
|
||||||
},
|
},
|
||||||
picture: member.avatarURL,
|
picture: member.avatarURL,
|
||||||
|
password: client.config.defaultAccountPassword,
|
||||||
});
|
});
|
||||||
const passwordTicket = await client.util.authClient.createPasswordChangeTicket({
|
const passwordTicket = await client.util.authClient.createPasswordChangeTicket({
|
||||||
email: acknowledgement.emailAddress,
|
email: acknowledgement.emailAddress,
|
||||||
|
@ -340,7 +345,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
|
||||||
logNewPager(client, randomPagerNumber, member);
|
logNewPager(client, randomPagerNumber, member);
|
||||||
client.getDMChannel(member.id).then((chan) => {
|
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(`__**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')) {
|
} else if (!pager && member.roles.includes('701481967149121627')) {
|
||||||
// Associates
|
// Associates
|
||||||
|
@ -374,6 +379,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
|
||||||
associate: true,
|
associate: true,
|
||||||
},
|
},
|
||||||
picture: member.avatarURL,
|
picture: member.avatarURL,
|
||||||
|
password: client.config.defaultAccountPassword,
|
||||||
});
|
});
|
||||||
const passwordTicket = await client.util.authClient.createPasswordChangeTicket({
|
const passwordTicket = await client.util.authClient.createPasswordChangeTicket({
|
||||||
email: acknowledgement.emailAddress,
|
email: acknowledgement.emailAddress,
|
||||||
|
@ -382,7 +388,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
|
||||||
logNewPager(client, randomPagerNumber, member);
|
logNewPager(client, randomPagerNumber, member);
|
||||||
client.getDMChannel(member.id).then((chan) => {
|
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(`__**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}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,4 +13,5 @@ export declare interface Config {
|
||||||
amiClientKey: string;
|
amiClientKey: string;
|
||||||
auth0ClientID: string;
|
auth0ClientID: string;
|
||||||
auth0ClientSecret: string;
|
auth0ClientSecret: string;
|
||||||
|
defaultAccountPassword: string;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue