Browse Source

Use user(s) instead of users

master
Abheek Dhawan 4 years ago
parent
commit
6f05a4c91b
  1. 2
      index.js

2
index.js

@ -121,7 +121,7 @@ async function usersWithRole(message) {
} }
const roles = message.guild.roles.cache.filter(role => role.name.toLowerCase().includes(message.content.split(" ")[1])); const roles = message.guild.roles.cache.filter(role => role.name.toLowerCase().includes(message.content.split(" ")[1]));
const roleEmbed = new Discord.MessageEmbed() const roleEmbed = new Discord.MessageEmbed()
.setTitle(`${roles.array()[0].members.array().length} users with the role \`${roles.array()[0].name}\`:`) .setTitle(`${roles.array()[0].members.array().length} user(s) with the role \`${roles.array()[0].name}\`:`)
.setDescription(" • " + roles.array()[0].members.map(m => m.user.tag).join('\n\n • ')) .setDescription(" • " + roles.array()[0].members.map(m => m.user.tag).join('\n\n • '))
.setFooter(`Role ID: ${roles.array()[0].id}`) .setFooter(`Role ID: ${roles.array()[0].id}`)
.setTimestamp(); .setTimestamp();

Loading…
Cancel
Save