merge-requests/28/head
Matthew 2021-12-09 22:27:54 -05:00
parent 4d9af81e7b
commit fd5d2f5d30
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
2 changed files with 3 additions and 4 deletions

View File

@ -174,9 +174,7 @@ export default class Queue {
}
if (job.data.func) {
const func = eval(job.data.func);
console.log(application, job.data);
if (application.status === 'SUCCESS' && application.decision === 'APPROVED') func(this.client, job.data.userID);
console.log('\n\n\n\nok');
}
});
}

View File

@ -88,7 +88,8 @@ export default class Apply extends Command {
func: async (client: Client, ...data: any[]) => {
const dmember = await client.guilds.get(client.config.guildID).getRESTMember(data[0]);
const member = await this.client.db.Member.findOne({ userID: dmember.id }).lean().exec();
const csAccount = await CloudServicesUtil.fetchAccountStatus(dmember.id, this.client.config.internalKey);
const { CloudServicesUtilP } = require('../util');
const csAccount = await CloudServicesUtilP.fetchAccountStatus(dmember.id, this.client.config.internalKey);
if (!member) {
const addMember = new this.client.db.Member({
userID: dmember.id,
@ -97,7 +98,7 @@ export default class Apply extends Command {
}
this.client.db.Member.updateOne({ userID: dmember.id }, { $set: { misc: { t3TemporaryExpiration: { processed: false, date: new Date(Date.now() + 1800000), previousTier: csAccount.tier } } } }).exec();
await CloudServicesUtil.setTier(dmember.id, 3, this.client.config.internalKey);
await CloudServicesUtilP.setTier(dmember.id, 3, this.client.config.internalKey);
},
});