From 229c31e8673808b890c99b3bf06929c9ffb7daf9 Mon Sep 17 00:00:00 2001 From: Lamp Date: Fri, 10 Aug 2018 18:59:45 -0700 Subject: [PATCH] ready --- src/colorroles.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/colorroles.js b/src/colorroles.js index 1bcab08..7b4527c 100755 --- a/src/colorroles.js +++ b/src/colorroles.js @@ -97,12 +97,11 @@ commands.color = { exec: async function (message) { var str = message.txt(1); if (!str) return false; - var role = colorRoles.get(message.member); + var role = message.member.roles.find(role => role.name.startsWith('[')); if (!role) { if (message.author.presence.status == "offline") - message.reply([ - "You are invisible.", - "I can't see you.", + return message.reply([ + "You are offline.", "I can't change your color when you're invisible." ].random()); else await colorRoles.update(message.member);