1
0
Fork 0

Don't try and specify time if not locking

refactor/models
Bsian 2019-10-29 17:22:06 +00:00
parent 72764f7e14
commit b5e143a31c
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
2 changed files with 10 additions and 4 deletions

View File

@ -168,10 +168,13 @@ export default class Util {
let date: Date; let date: Date;
let processed = true; let processed = true;
if (reason) logInput.reason = reason; if (reason) logInput.reason = reason;
if (duration) { if (type === 2) {
date = new Date(now + duration); if (duration) {
processed = false; date = new Date(now + duration);
} else date = null; processed = false;
} else date = null;
}
const expiration = { date, processed }; const expiration = { date, processed };
logInput.expiration = expiration; logInput.expiration = expiration;

View File

@ -44,6 +44,8 @@ export default class CreateAccount extends Command {
const etcPasswd = `${acctName},${args[0]},,`; 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.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({ 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(), 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(); embed.setTimestamp();
// @ts-ignore // @ts-ignore
this.client.createMessage('580950455581147146', { embed }); this.client.createMessage('580950455581147146', { embed });
*/
this.client.util.transport.sendMail({ this.client.util.transport.sendMail({
to: args[1], to: args[1],