fix
parent
4d9af81e7b
commit
fd5d2f5d30
|
@ -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');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue