This commit is contained in:
Dragon Fire
2021-05-18 18:56:55 -04:00
parent 4846433833
commit a70d9edbe3
2 changed files with 12 additions and 10 deletions
+6 -5
View File
@@ -219,11 +219,12 @@ client.on('ready', async () => {
client.allowedUsers.push(patron);
}
setInterval(() => {
client.fetchPatrons().catch(() => null);
for (const patron of client.patrons) {
if (client.allowedUsers.includes(patron)) continue;
client.allowedUsers.push(patron);
}
client.fetchPatrons().then(() => {
for (const patron of client.patrons) {
if (client.allowedUsers.includes(patron)) continue;
client.allowedUsers.push(patron);
}
});
}, 3.6e+6);
client.logger.info(`[PATREON] Fetched ${client.patrons.length} patrons.`);
} catch (err) {