From 1d490792fd0b0cbb87ae4169982060b2e2de8f7c Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Thu, 1 Apr 2021 17:32:33 -0500 Subject: [PATCH] Use roles.name --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 0f15cef..388e7e7 100644 --- a/index.js +++ b/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);