From 361fa4a5ccbbf4700010aef7b5a00dd4ded0096c Mon Sep 17 00:00:00 2001 From: Matthew R Date: Mon, 11 Oct 2021 21:05:12 -0400 Subject: [PATCH] fixes --- src/intervals/t2Checks.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/intervals/t2Checks.ts b/src/intervals/t2Checks.ts index 7fff64c..4db78bc 100644 --- a/src/intervals/t2Checks.ts +++ b/src/intervals/t2Checks.ts @@ -26,7 +26,7 @@ async function checkt2(auth: string, userID: string) { } export default async function t2checkCron(client: Client) { - const checkTier2StatusJob = new cron.CronJob('0 21 * * *', async () => { + const checkTier2StatusJob = new cron.CronJob('7 21 * * *', async () => { const users = await client.db.Account.find({ tier: 2 }).lean(); for (const user of users) { @@ -37,10 +37,11 @@ export default async function t2checkCron(client: Client) { embed.setColor('#0099ff'); embed.addField('User', `${user.username} | <@${user.userID}>`, true); embed.addField('Technician', 'SYSTEM', true); - embed.addField('Old Tier -> New Tier', `${user.tier} -> ${args[1]}`, true); + embed.addField('Old Tier -> New Tier', `${user.tier} -> 1`, true); embed.setFooter(client.user.username, client.user.avatarURL()); embed.setTimestamp(); const ch = client.channels.cache.get('580950455581147146') as TextChannel; + await client.db.Account.updateOne({ userID: user.userID }, { $set: { tier: 1 } }); ch.send({ embeds: [embed] }); return client.users.fetch(user.userID).then((u) => u.send({ embeds: [embed], content: `__**Tier 2 Account Review**__\n\nHello, <@${user.userID}>.\nWe periodically run automatic account review inquiries for users with Tier 2. This means we request an account review from EDS to determine if you're still eligible to keep Tier 2.\nUnfortunately, according to EDS' records, you are currently ineligible for Tier 2. Because of this, we're going to automatically revoke your Tier 2 status. You can re-apply to Tier 2 at any time if you feel that you meet the requirements. If you have any questions, or if you believe this may be a mistake, please contact our support team as soon as possible. Thank you.` })).catch(); }