'Discord JS - Counting boosts

I have one counter left to create. And for this one I don't really know which direction to take. I believe counting the number of members with the boost role will be wrong as members can have boosted the server twice.

module.exports = async(client) => {
    const guild = client.guilds.cache.get('912706237806829598');


    setInterval(async () => {
        const boostCount = (await guild.members.fetch()).filter(????????).size;
        const channel = guild.channels.cache.get('960832075349499925');
        channel.setName(`╭🌕・Boosts: ${boostCount.toLocaleString()}`);
        console.log('Updating Boost Count');
        console.log(boostCount);
     }, 600000);
}

I don't know if I get achieve this by putting something inside filter. Looking at the members is probably not correct as well. Really need some assistance for this one.



Solution 1:[1]

Making use of guild.premiumSubscriptionCount would help you out. It will count all the boosts in total including double boosts.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Zsolt Meszaros