5 |
} |
} |
6 |
|
|
7 |
if (!msg.member.roles.cache.has(app.config.props[msg.guild.id].mod_role)) { |
if (!msg.member.roles.cache.has(app.config.props[msg.guild.id].mod_role)) { |
8 |
return false; |
//console.log('mod-role not found: ' + msg.author.tag); |
9 |
|
return false; |
10 |
} |
} |
11 |
|
|
12 |
const roles = app.config.props[msg.guild.id].role_commands; |
const roles = app.config.props[msg.guild.id].role_commands; |
13 |
|
|
14 |
for (let roleID in roles) { |
for (let roleID in roles) { |
15 |
if (msg.member.roles.cache.has(roleID) && roles[roleID].indexOf(cm.commandName) === -1) { |
// console.log(roleID + ' search'); |
16 |
|
if (msg.member.roles.cache.has(roleID)) { |
17 |
|
if (roles[roleID].indexOf(cm.commandName) === -1) { |
18 |
return true; |
return true; |
19 |
|
} |
20 |
|
else { |
21 |
|
return false; |
22 |
|
} |
23 |
} |
} |
24 |
} |
} |
25 |
|
|