2020-05-06 19:33:46 -04:00
|
|
|
import { Client } from '../class';
|
|
|
|
|
|
|
|
let interval: NodeJS.Timeout;
|
|
|
|
|
|
|
|
export default async function fetchMembers(client: Client): Promise<NodeJS.Timeout> {
|
2020-05-21 07:40:53 -04:00
|
|
|
await client.guilds.get(client.config.guildID)?.fetchAllMembers();
|
2020-05-06 19:33:46 -04:00
|
|
|
interval = setInterval(async () => {
|
|
|
|
await client.guilds.get(client.config.guildID).fetchAllMembers();
|
|
|
|
}, 1800000);
|
|
|
|
return interval;
|
|
|
|
}
|