diff --git a/index.js b/index.js index 4efe0e6..cb20877 100644 --- a/index.js +++ b/index.js @@ -148,7 +148,7 @@ async function addRole(message) { const members = message.guild.members.cache.filter(member => { if (member.nickname) { - return member.user.username.toLowerCase().includes(message.content.split(" ")[2].toLowerCase()) || member.nickname.toLowerCase().includes(message.content.split(" ")[1].toLowerCase()); + return member.user.username.toLowerCase().includes(message.content.split(" ")[2].toLowerCase()) || member.nickname.toLowerCase().includes(message.content.split(" ")[2].toLowerCase()); } else { return member.user.username.toLowerCase().includes(message.content.split(" ")[2].toLowerCase()) }