changes
parent
cffe646796
commit
44aea3165f
|
@ -80,8 +80,8 @@ export default class Apply extends Command {
|
||||||
url: 'https://eds.libraryofcode.org/cs/t3-temp',
|
url: 'https://eds.libraryofcode.org/cs/t3-temp',
|
||||||
validation: async (member: Member) => {
|
validation: async (member: Member) => {
|
||||||
const csAccount = await CloudServicesUtil.fetchAccountStatus(member.id, this.client.config.internalKey);
|
const csAccount = await CloudServicesUtil.fetchAccountStatus(member.id, this.client.config.internalKey);
|
||||||
// const memberCheck = await this.client.db.Member.findOne({ userID: member.id }).lean().exec();
|
const memberCheck = await this.client.db.Member.findOne({ userID: member.id }).lean().exec();
|
||||||
// if (new Date() > memberCheck?.misc?.t3TemporaryExpiration?.date) return false;
|
if (new Date() > memberCheck?.misc?.t3TemporaryExpiration?.date) return false;
|
||||||
if (csAccount.tier === 3) return false;
|
if (csAccount.tier === 3) return false;
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
@ -95,7 +95,7 @@ export default class Apply extends Command {
|
||||||
});
|
});
|
||||||
await addMember.save();
|
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);
|
await CloudServicesUtil.setTier(dmember.id, 3, this.client.config.internalKey);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue