title: DiscordJS online members count
body: <p>I am making my discord Admin bot (only for my server) and I am trying to do online members counter. I tried this:</p>
  <pre class="lang-js prettyprint-override"><code>client.guilds.cache.get(ids.serverID).members
    .filter(m =&gt; m.presence.status === 'online').size;
  </code></pre>
  <p>and it gave this error:</p>
  <pre><code>var online = client.guilds.cache.get(ids.serverID).members.filter(m =&gt; m.presence.status === 'online').size;
                                                             ^
  TypeError: client.guilds.cache.get(...).members.filter is not a function
      at Client.&lt;anonymous&gt; (/home/cyril/Documents/ALPHA-Admin/main.js:40:62)
      at Client.emit (events.js:315:20)
      at PresenceUpdateAction.handle (/home/cyril/Documents/ALPHA-Admin/node_modules/discord.js/src/client/actions/PresenceUpdate.js:39:19)
      at Object.module.exports [as PRESENCE_UPDATE] (/home/cyril/Documents/ALPHA-Admin/node_modules/discord.js/src/client/websocket/handlers/PRESENCE_UPDATE.js:4:33)
      at WebSocketManager.handlePacket (/home/cyril/Documents/ALPHA-Admin/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
      at WebSocketShard.onPacket (/home/cyril/Documents/ALPHA-Admin/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
      at WebSocketShard.onMessage (/home/cyril/Documents/ALPHA-Admin/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
      at WebSocket.onMessage (/home/cyril/Documents/ALPHA-Admin/node_modules/ws/lib/event-target.js:132:16)
      at WebSocket.emit (events.js:315:20)
      at Receiver.receiverOnMessage (/home/cyril/Documents/ALPHA-Admin/node_modules/ws/lib/websocket.js:825:20)
  </code></pre>
  <p>Can anyone please help me out? Thank you.</p>