discord.js get username
message.author.username
discord.js get username
message.author.username
discord.js v12 how to set owner commands
// First we use guild.members.fetch to make sure all members are cached
<message>.guild.members.fetch().then(fetchedMembers => {
const totalOnline = fetchedMembers.filter(member => member.presence.status === 'online');
// We now have a collection with all online member objects in the totalOnline variable
<message>.channel.send(`There are currently ${totalOnline.size} members online in this guild!`);
});
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us