bow do filtet cached members based on their presence

so i tried to filter members based on their presence like
${interaction.guild.members.cache.filter(m => m.presence?.status === "dnd").size}
${interaction.guild.members.cache.filter(m => m.presence?.status === "dnd").size}
but it throws an error saying interaction.guild.members.cache.filter(...) Is not a function
1 Reply
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server