Bug fix
parent
d6ec1d6a6c
commit
7ade778788
|
@ -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 } });
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue