Browse Source

Use roles.name

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

2
index.js

@ -45,7 +45,7 @@ async function usersWithRole(message) {
if (message.content.split(" ")[1].length < 3) {
message.reply("query must contain at least 3 characters!")
}
const roles = message.guild.roles.cache.filter(role => role.name.includes(message.content.split(" ")[1]));
const roles = message.guild.roles.cache.filter(role => role.name.includes(message.content.split(" ")[1])).name;
console.log(message.content.split(" ")[1]);
console.log(roles);
message.reply(roles);

Loading…
Cancel
Save