From 5c869bd803841ad8943a61b1ba6b5db7b75a1d80 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sun, 29 Mar 2020 18:12:36 -0400 Subject: [PATCH] fix interval --- src/intervals/checkStaffStatus.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intervals/checkStaffStatus.ts b/src/intervals/checkStaffStatus.ts index 0d318de..2bc8448 100644 --- a/src/intervals/checkStaffStatus.ts +++ b/src/intervals/checkStaffStatus.ts @@ -6,7 +6,7 @@ export default function checkStaffStatus(client: Client) { setInterval(async () => { const accounts = await client.db.Account.find(); for (const acc of accounts) { - const user = client.guilds.get('446067825673633794').members.get(acc.userID) ?? await client.guilds.get('446067825673633794').getRESTMember(acc.userID); + const user = client.guilds.get('446067825673633794').members.get(acc.userID) || await client.guilds.get('446067825673633794').getRESTMember(acc.userID); if (!acc.permissions.facultyMarshal && user.roles.includes('662163685439045632')) { await client.db.Account.updateOne({ username: acc.username }, { $set: { 'permissions.facultyMarshal': true } }); }