#so how do i filter to show only members

1 messages ยท Page 1 of 1 (latest)

snow sigil
#

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] })
    }
        }
lilac grove
#

<GuildMemberManager>.filter(m => m.roles.cache.size == 1)

stoic garnet
#

check if the roles cache size is equal to 1,

snow sigil
#

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?

snow sigil
lilac grove
#

we will not spoonfeed you any further

snow sigil
#

lol. maybe you should create a channel for that?

lilac grove
#

spoonfeeding? no. all of this is basically just basic js and not djs

snow sigil
#

thats why i am learning my friend..

lilac grove
#

learn js before coding a djs bot, anyway, off-topic and we wont spoonfeed you

snow sigil
#

also the chhanges with every update doesnt help

#

i know js

#

basics

lilac grove
#

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.

snow sigil
#

later

#

def a boomer..

lilac grove
#

hahaha.. no ๐Ÿ˜„

snow sigil
#

thats some old cranky attitude bruh

stoic garnet
#

if you got an answer theres no reason to continue this

lilac grove
#

they want to be spoonfed

#

:/

#

and dont accept a no, and then try insulting me lol

snow sigil
#

i asked foor whoever is willing to offer thheir help

stoic garnet
#

just ignore and move on

snow sigil
#

never asked for soomone to come judge my coding skills

lilac grove
#

yep will do so but this is kinda funny

snow sigil
#

if u dont want to offer, u didnt have to come into the thread mate

lilac grove