mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 13:43:06 -04:00
allow model changing for approved users
This commit is contained in:
parent
b56a0730f6
commit
32bf8bf119
2 changed files with 25 additions and 3 deletions
|
@ -7,6 +7,21 @@ if(process.env.TESTING_CHANNEL_IDS) LIMITED_TEST_CHANNELS = process.env.TESTING_
|
|||
let LIMITED_TEST_USERS;
|
||||
if(process.env.TESTING_USER_IDS) LIMITED_TEST_USERS = process.env.TESTING_USER_IDS.split(';')
|
||||
|
||||
function isLimitedTestGuild(guild){
|
||||
if(LIMITED_TEST_GUILDS && LIMITED_TEST_GUILDS.includes(guild.id)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function isLimitedTestChannel(channel){
|
||||
if(LIMITED_TEST_CHANNELS && LIMITED_TEST_CHANNELS.includes(channel.id)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function isLimitedTestUser(user){
|
||||
if(LIMITED_TEST_USERS && LIMITED_TEST_USERS.includes(user.id)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
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;
|
||||
|
@ -15,5 +30,8 @@ function canUseLimitedTestCommands(context){
|
|||
}
|
||||
|
||||
module.exports = {
|
||||
canUseLimitedTestCommands
|
||||
canUseLimitedTestCommands,
|
||||
isLimitedTestGuild,
|
||||
isLimitedTestChannel,
|
||||
isLimitedTestUser
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue