From cf0bb51c1fd1c915761451c25c71faa93d711a89 Mon Sep 17 00:00:00 2001 From: Bsian Date: Wed, 30 Oct 2019 20:15:56 +0000 Subject: [PATCH] Fixed some stuff --- src/class/Util.ts | 2 +- src/commands/createaccount.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/class/Util.ts b/src/class/Util.ts index 1398782..185aaaa 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -117,7 +117,7 @@ export default class Util { public randomPassword(): string { let tempPass = ''; const passChars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0']; - tempPass += passChars[Math.floor(Math.random() * passChars.length)]; + while (tempPass.length < 5) { tempPass += passChars[Math.floor(Math.random() * passChars.length)]; } return tempPass; } diff --git a/src/commands/createaccount.ts b/src/commands/createaccount.ts index 6142ee2..174bbff 100644 --- a/src/commands/createaccount.ts +++ b/src/commands/createaccount.ts @@ -119,7 +119,7 @@ export default class CreateAccount extends Command { + 'You may now return to Modmail, and continue setting up your account from there.\n\n' + 'An email containing some useful information has also been sent').catch(); - return confirmation.edit(`${this.client.stores.emojis.success} ***Account successfully created***\n**Username:** \`${args[3]}\`\n**Temporary Password:** \`${tempPass}\``); + return confirmation.edit(`${this.client.stores.emojis.success} ***Account successfully created***\n**Username:** \`${args[2]}\`\n**Temporary Password:** \`${tempPass}\``); } catch (error) { return this.client.util.handleError(error, message, this); }