mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 06:33:05 -04:00
prevent limited test commands from showing outside
of limited tests
This commit is contained in:
parent
54c351c1a3
commit
9bb2e00ee8
2 changed files with 5 additions and 3 deletions
|
@ -23,9 +23,9 @@ function isLimitedTestUser(user){
|
|||
}
|
||||
|
||||
function canUseLimitedTestCommands(context){
|
||||
if(LIMITED_TEST_GUILDS && LIMITED_TEST_GUILDS.includes(context.guild.id)) return true;
|
||||
if(LIMITED_TEST_CHANNELS && LIMITED_TEST_CHANNELS.includes(context.channel.id)) return true;
|
||||
if(LIMITED_TEST_USERS && LIMITED_TEST_USERS.includes(context.user.id)) return true;
|
||||
if(isLimitedTestGuild(context.guild)) return true;
|
||||
if(isLimitedTestChannel(context.channel)) return true;
|
||||
if(isLimitedTestUser(context.user)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue