clean my own code
This commit is contained in:
1 file changed
+6
-6
@@ -280,12 +280,12 @@ class LinesPoliceCadBot extends Client {
|
|||||||
*/
|
*/
|
||||||
async verifyUseCommand(serverID, rolesCache, isList) {
|
async verifyUseCommand(serverID, rolesCache, isList) {
|
||||||
let { customRoleStatus } = await this.GetGuild(serverID)
|
let { customRoleStatus } = await this.GetGuild(serverID)
|
||||||
if (customRoleStatus) {
|
if (!customRoleStatus) return false; // There is no role limits
|
||||||
let hasRole = await this.checkRoleStatus(rolesCache, serverID, isList);
|
|
||||||
if (hasRole) {
|
let hasRole = await this.checkRoleStatus(rolesCache, serverID, isList);
|
||||||
return true // User has role, can use command
|
if (!hasRole) return false; // User does not have role
|
||||||
} else return false // User does not have role, can't use command
|
|
||||||
} else return true // There is no role limits
|
return true; // User has role
|
||||||
}
|
}
|
||||||
|
|
||||||
log(Text) { this.logger.log(Text); }
|
log(Text) { this.logger.log(Text); }
|
||||||
|
|||||||
Reference in new issue
Block a user