I'm using discord.js version 12, the problem is that the bot is only selecting 2 users out of the entire server (The author of the message and the bot) and I want it to be able to pick anybody from the server.
Here's the code that I've tried:
client.on('message', msg=>{
if(msg.content.toLowerCase() === "!sru"){
const randomUser = msg.guild.members.cache.random();
msg.channel.send(`${randomUser.user.username}#${randomUser.user.discriminator}`);
}
})
Thanks in advance.