'(discord.js) Problem listing all the members

function getMembers(serverId) {
    const server = client.guilds.cache.get(serverId)
    server.members.fetch({limit: 1})
        .then(console.log)
        .catch(console.error)
}

This function never returns anything. Can you help me?



Sources

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

Source: Stack Overflow

Solution Source