fix apply cmd

master
Matthew 2022-09-04 21:24:13 -04:00
parent fff98867c7
commit ca6e20fa0b
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 1 additions and 0 deletions

View File

@ -99,6 +99,7 @@ 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);
if (!csAccount) return false;
const memberCheck = await this.client.db.mongo.Member.findOne({ userID: member.id }).lean().exec();
if (new Date() > memberCheck?.misc?.t3TemporaryExpiration?.date) return false;
if (csAccount.tier === 3) return false;