From 44aea3165f4ce8f5c38b89fb36f15cd49b071f90 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Thu, 9 Dec 2021 21:54:51 -0500 Subject: [PATCH] changes --- src/commands/apply.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/apply.ts b/src/commands/apply.ts index 8452da6..701c886 100644 --- a/src/commands/apply.ts +++ b/src/commands/apply.ts @@ -80,8 +80,8 @@ export default class Apply extends Command { url: 'https://eds.libraryofcode.org/cs/t3-temp', validation: async (member: Member) => { const csAccount = await CloudServicesUtil.fetchAccountStatus(member.id, this.client.config.internalKey); - // const memberCheck = await this.client.db.Member.findOne({ userID: member.id }).lean().exec(); - // if (new Date() > memberCheck?.misc?.t3TemporaryExpiration?.date) return false; + const memberCheck = await this.client.db.Member.findOne({ userID: member.id }).lean().exec(); + if (new Date() > memberCheck?.misc?.t3TemporaryExpiration?.date) return false; if (csAccount.tier === 3) return false; return true; }, @@ -95,7 +95,7 @@ export default class Apply extends Command { }); await addMember.save(); } - await this.client.db.Member.updateOne({ userID: dmember.id }, { $set: { misc: { t3TemporaryExpiration: { processed: false, date: new Date(Date.now() + 129600000), previousTier: csAccount.tier } } } }); + await this.client.db.Member.updateOne({ userID: dmember.id }, { $set: { misc: { t3TemporaryExpiration: { processed: false, date: new Date(Date.now() + 1800000), previousTier: csAccount.tier } } } }); await CloudServicesUtil.setTier(dmember.id, 3, this.client.config.internalKey); },