From 2cd8185c0a57bf67da4dea3a4cd20cb0e010c9cb Mon Sep 17 00:00:00 2001 From: SowinskiBraeden Date: Mon, 22 Jan 2024 12:27:33 -0800 Subject: [PATCH] clean my own code --- structures/LinesPoliceCadBot.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/structures/LinesPoliceCadBot.js b/structures/LinesPoliceCadBot.js index f9a95e6..ee5d303 100644 --- a/structures/LinesPoliceCadBot.js +++ b/structures/LinesPoliceCadBot.js @@ -280,12 +280,12 @@ class LinesPoliceCadBot extends Client { */ async verifyUseCommand(serverID, rolesCache, isList) { let { customRoleStatus } = await this.GetGuild(serverID) - if (customRoleStatus) { - let hasRole = await this.checkRoleStatus(rolesCache, serverID, isList); - if (hasRole) { - return true // User has role, can use command - } else return false // User does not have role, can't use command - } else return true // There is no role limits + if (!customRoleStatus) return false; // There is no role limits + + let hasRole = await this.checkRoleStatus(rolesCache, serverID, isList); + if (!hasRole) return false; // User does not have role + + return true; // User has role } log(Text) { this.logger.log(Text); }