fix
parent
361fa4a5cc
commit
3e1731ef89
|
@ -26,11 +26,12 @@ async function checkt2(auth: string, userID: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function t2checkCron(client: Client) {
|
export default async function t2checkCron(client: Client) {
|
||||||
const checkTier2StatusJob = new cron.CronJob('7 21 * * *', async () => {
|
const checkTier2StatusJob = new cron.CronJob('13 21 * * *', async () => {
|
||||||
const users = await client.db.Account.find({ tier: 2 }).lean();
|
const users = await client.db.Account.find({ tier: 2 }).lean();
|
||||||
|
|
||||||
for (const user of users) {
|
for (const user of users) {
|
||||||
const check = await checkt2(client.config.internalKey, user.userID);
|
const check = await checkt2(client.config.internalKey, user.userID);
|
||||||
|
console.log(check);
|
||||||
if (check.decision === 'DECLINED') {
|
if (check.decision === 'DECLINED') {
|
||||||
const embed = new MessageEmbed();
|
const embed = new MessageEmbed();
|
||||||
embed.setTitle('Cloud Account | Tier Change');
|
embed.setTitle('Cloud Account | Tier Change');
|
||||||
|
|
Loading…
Reference in New Issue