mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 06:03:04 -04:00
icon redesign
This commit is contained in:
parent
a4df6550cd
commit
6b4e0f3347
19 changed files with 162 additions and 76 deletions
19
labscore/utils/testing.js
Normal file
19
labscore/utils/testing.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
|
||||
// Get Test Config
|
||||
let LIMITED_TEST_GUILDS;
|
||||
if(process.env.TESTING_SERVER_IDS) LIMITED_TEST_GUILDS = process.env.TESTING_SERVER_IDS.split(';')
|
||||
let LIMITED_TEST_CHANNELS;
|
||||
if(process.env.TESTING_CHANNEL_IDS) LIMITED_TEST_CHANNELS = process.env.TESTING_CHANNEL_IDS.split(';')
|
||||
let LIMITED_TEST_USERS;
|
||||
if(process.env.TESTING_USER_IDS) LIMITED_TEST_USERS = process.env.TESTING_USER_IDS.split(';')
|
||||
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
canUseLimitedTestCommands
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue