pull/15/head
Matthew 2021-10-11 21:11:19 -04:00
parent 361fa4a5cc
commit 3e1731ef89
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 2 additions and 1 deletions

View File

@ -26,11 +26,12 @@ async function checkt2(auth: string, userID: string) {
}
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();
for (const user of users) {
const check = await checkt2(client.config.internalKey, user.userID);
console.log(check);
if (check.decision === 'DECLINED') {
const embed = new MessageEmbed();
embed.setTitle('Cloud Account | Tier Change');