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); },