From c045b3398ef4493eaa0c01775bc9987fb7be0fa0 Mon Sep 17 00:00:00 2001 From: Matt Burchett Date: Wed, 22 Mar 2017 16:30:55 -0500 Subject: [PATCH] Adding a fetch members in the sleep, since it appears to hang --- bot.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bot.js b/bot.js index 9088976..6164d10 100644 --- a/bot.js +++ b/bot.js @@ -35,7 +35,9 @@ client.Dispatcher.on(Events.GATEWAY_READY, e => { // acknoledge connection to console logs logcon.info('Connected as: ' + client.User.username); // check for the number of active users every 30 seconds and log to the active users logs - setInterval(function() {actcon.info(config.guild_name + " Active Users: " + client.Users.onlineMembersForGuild(config.guild_id).length);}, 30000) + setInterval(function() { + client.Users.fetchMembers(config.guild_id); + actcon.info(config.guild_name + " Active Users: " + client.Users.onlineMembersForGuild(config.guild_id).length);}, 30000) }); // when messages are created