diff --git a/src/class/Util.ts b/src/class/Util.ts index 7911e18..dae9f58 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -168,10 +168,13 @@ export default class Util { let date: Date; let processed = true; if (reason) logInput.reason = reason; - if (duration) { - date = new Date(now + duration); - processed = false; - } else date = null; + if (type === 2) { + if (duration) { + date = new Date(now + duration); + processed = false; + } else date = null; + } + const expiration = { date, processed }; logInput.expiration = expiration; diff --git a/src/commands/createaccount.ts b/src/commands/createaccount.ts index d630bb8..6142ee2 100644 --- a/src/commands/createaccount.ts +++ b/src/commands/createaccount.ts @@ -44,6 +44,8 @@ export default class CreateAccount extends Command { const etcPasswd = `${acctName},${args[0]},,`; await this.client.util.createAccount(passHash, etcPasswd, args[2], args[0], args[1], message.author.id); + await this.client.util.createModerationLog(args[0], message.member, 0); + /* const log = await new this.client.db.Moderation({ username: args[2], userID: args[0], logID: uuid(), moderatorID: message.author.id, reason: 'User requested account creation', type: 0, date: new Date(), }); @@ -59,6 +61,7 @@ export default class CreateAccount extends Command { embed.setTimestamp(); // @ts-ignore this.client.createMessage('580950455581147146', { embed }); + */ this.client.util.transport.sendMail({ to: args[1],