From 47815ac6d8c8fc1f8ddd84ede7f7397a11e3e1a1 Mon Sep 17 00:00:00 2001 From: xlq902 <64386991+xlq902@users.noreply.github.com> Date: Tue, 13 Apr 2021 11:54:43 -0400 Subject: [PATCH 1/2] Updating bot.js Fixing issue where only lowercase inputs were responded to by the bot --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index 55ed58c..f7c98bb 100644 --- a/bot.js +++ b/bot.js @@ -618,7 +618,7 @@ async function usersWith(message) { message.reply("query must contain at least 3 characters!") return; } - 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]).toLowerCase()); const role = roles.array()[0]; const membersList = roles.array()[0].members.array() if (membersList.length > threshold) { From d27f8d9259a46a2c569ad68b923a906198db36c0 Mon Sep 17 00:00:00 2001 From: Abheek <67982792+ADawesomeguy@users.noreply.github.com> Date: Tue, 13 Apr 2021 11:12:19 -0500 Subject: [PATCH 2/2] Fix misplaced parenthesis --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index f7c98bb..cab869b 100644 --- a/bot.js +++ b/bot.js @@ -618,7 +618,7 @@ async function usersWith(message) { message.reply("query must contain at least 3 characters!") return; } - const roles = message.guild.roles.cache.filter(role => role.name.toLowerCase().includes(message.content.split(" ")[1]).toLowerCase()); + const roles = message.guild.roles.cache.filter(role => role.name.toLowerCase().includes(message.content.split(" ")[1].toLowerCase())); const role = roles.array()[0]; const membersList = roles.array()[0].members.array() if (membersList.length > threshold) {