diff --git a/src/class/AccountUtil.ts b/src/class/AccountUtil.ts index cbb7022..2fdcb70 100644 --- a/src/class/AccountUtil.ts +++ b/src/class/AccountUtil.ts @@ -76,12 +76,16 @@ export default class AccountUtil { const member = guild.members.cache.get(data.userID); await member.roles.add('546457886440685578'); const user = this.client.users.cache.get(data.userID); - user.send('<:loc:607695848612167700> **Thank you for creating an account with us!** <:loc:607695848612167700>\n' - + `Please log into your account by running \`ssh ${data.username}@cloud.libraryofcode.org\` in your terminal, then use the password \`${tempPass}\` to log in.\n` - + `You will be asked to change your password, \`(current) UNIX password\` is \`${tempPass}\`, then create a password that is at least 12 characters long, with at least one number, special character, and an uppercase letter\n` - + 'Bear in mind that when you enter your password, it will be blank, so be careful not to type in your password incorrectly.\n\n' - + 'An email containing some useful information has also been sent.\n' - + `Your support key is \`${code}\`. Pin this message, you may need this key to contact Library of Code in the future.`).catch(); + try { + await user.send('<:loc:607695848612167700> **Thank you for creating an account with us!** <:loc:607695848612167700>\n' + + `Please log into your account by running \`ssh ${data.username}@cloud.libraryofcode.org\` in your terminal, then use the password \`${tempPass}\` to log in.\n` + + `You will be asked to change your password, \`(current) UNIX password\` is \`${tempPass}\`, then create a password that is at least 12 characters long, with at least one number, special character, and an uppercase letter\n` + + 'Bear in mind that when you enter your password, it will be blank, so be careful not to type in your password incorrectly.\n\n' + + 'An email containing some useful information has also been sent.\n' + + `Your support key is \`${code}\`. Pin this message, you may need this key to contact Library of Code in the future.`); + } catch (error) { + this.client.util.handleError(error); + } return { account: accountInterface, tempPass }; }