#so how do i filter to show only members
1 messages ยท Page 1 of 1 (latest)
module.exports = {
name: 'rolecount', //name of your command
description: 'Count the number of members with roles in this server.', //description of your command
run: async(client, message, args) => {
const role = '957002450244608072'
let embed = new MessageEmbed()
.setTitle(`Role Count`)
.setDescription(`${message.guild.members.cache.filter(m => m.roles.cache.some(r => r.id === role)).size.toLocaleString()}`)
message.channel.send({ embeds: [embed] })
}
}
<GuildMemberManager>.filter(m => m.roles.cache.size == 1)
check if the roles cache size is equal to 1,
this code is working perfectly with the role id in place
to make it show members with no role other than the default @ everyoone, what do i change?
okoay will try that ๐
use this
we will not spoonfeed you any further
lol. maybe you should create a channel for that?
spoonfeeding? no. all of this is basically just basic js and not djs
thats why i am learning my friend..
learn js before coding a djs bot, anyway, off-topic and we wont spoonfeed you
then you should know how to implement the already written code
if you don't, you clearly dont know js.
anyway: we won't spoonfeed you and I'll be leaving this thread now.
hahaha.. no ๐
thats some old cranky attitude bruh
if you got an answer theres no reason to continue this
i asked foor whoever is willing to offer thheir help
just ignore and move on
never asked for soomone to come judge my coding skills
yep will do so but this is kinda funny
if u dont want to offer, u didnt have to come into the thread mate