fetch all members every 30 minutes
parent
2bf98fa923
commit
0a55962e28
|
@ -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;
|
||||
}
|
Loading…
Reference in New Issue