From 8a10b66f292b57c9a6b645db0ba2c5ab287e5193 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Fri, 2 Apr 2021 20:43:33 -0500 Subject: [PATCH] Make sure to convert user input to lower case as well --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 55d25ac..e324547 100644 --- a/index.js +++ b/index.js @@ -117,9 +117,9 @@ async function ban(message) { const members = message.guild.members.cache.filter(member => { if (member.nickname) { - return member.user.username.toLowerCase().includes(message.content.split(" ")[1]) || member.nickname.toLowerCase().includes(message.content.split(" ")[1]); + return member.user.username.toLowerCase().includes(message.content.split(" ")[1].toLowerCase() || member.nickname.toLowerCase().includes(message.content.split(" ")[1].toLowerCase()); } else { - return member.user.username.toLowerCase().includes(message.content.split(" ")[1]) + return member.user.username.toLowerCase().includes(message.content.split(" ")[1].toLowerCase()) } });