1
0
Fork 0
refactor/models
Bsian 2020-03-29 23:11:21 +01:00
parent d6ec1d6a6c
commit 7ade778788
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ export default function checkStaffStatus(client: Client) {
setInterval(async () => { setInterval(async () => {
const accounts = await client.db.Account.find(); const accounts = await client.db.Account.find();
for (const acc of accounts) { 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')) { if (!acc.permissions.facultyMarshal && user.roles.includes('662163685439045632')) {
await client.db.Account.updateOne({ username: acc.username }, { $set: { 'permissions.facultyMarshal': true } }); await client.db.Account.updateOne({ username: acc.username }, { $set: { 'permissions.facultyMarshal': true } });
} }