fetch all members every 30 minutes

merge-requests/11/merge
Matthew 2020-05-06 19:33:46 -04:00
parent 028e905662
commit a1463e6821
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
import { Client } from '../class';
let interval: NodeJS.Timeout;
export default async function fetchMembers(client: Client): Promise<NodeJS.Timeout> {
await client.guilds.get(client.config.guildID).fetchAllMembers();
interval = setInterval(async () => {
await client.guilds.get(client.config.guildID).fetchAllMembers();
}, 1800000);
return interval;
}