From 7ade77878824a5b4c5bed5c2585b5ff986b283b1 Mon Sep 17 00:00:00 2001 From: Bsian Date: Sun, 29 Mar 2020 23:11:21 +0100 Subject: [PATCH] Bug fix --- 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 } }); }