From 352f01b6452a31dfd12cf8aa9e0869b7270b99f3 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Thu, 1 Apr 2021 17:17:01 -0500 Subject: [PATCH] Use presence.status instead of presence --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 7e6f4d0..515b1bc 100644 --- a/index.js +++ b/index.js @@ -46,10 +46,10 @@ async function aboutServer(message) { const numHumans = message.guild.members.cache.filter(member => !member.user.bot).size; const numBots = message.guild.members.cache.filter(member => member.user.bot).size; const numRoles = message.guild.roles.cache.size; - const numOnline = message.guild.members.cache.filter(member => member.user.presence === "online").size; - const numOffline = message.guild.members.cache.filter(member => member.user.presence === "offline").size; - const numAway = message.guild.members.cache.filter(member => member.user.presence === "idle").size; - const numDND = message.guild.members.cache.filter(member => member.user.presence === "dnd").size; + const numOnline = message.guild.members.cache.filter(member => member.user.presence.status === "online").size; + const numOffline = message.guild.members.cache.filter(member => member.user.presence.status === "offline").size; + const numAway = message.guild.members.cache.filter(member => member.user.presence.status === "idle").size; + const numDND = message.guild.members.cache.filter(member => member.user.presence.status === "dnd").size; const aboutServerEmbed = new Discord.MessageEmbed() .setTitle(`About \`${message.guild.name}\``) .addField("Owner", `<@${message.guild.ownerID}>`)