wtf testmode

This commit is contained in:
Lamp 2018-07-13 21:40:56 -07:00
parent a8b451959e
commit 02d032d7df
No known key found for this signature in database
GPG Key ID: 0F1F8704BEDE369E
2 changed files with 16 additions and 16 deletions

View File

@ -1,32 +1,32 @@
global.testmode = process.env.TEST ? true : false;
module.exports = {
"testmode": process.env.TEST ? true : false,
"DISCORD_TOKEN": process.env.DISCORD_TOKEN,
"DATABASE_URL": this.testmode ? "postgres://localhost/k4t" : process.env.DATABASE_URL,
"MONGODB_URI": this.testmode ? "mongodb://localhost/k4t" : process.env.MONGODB_URI,
"DATABASE_URL": testmode ? "postgres://localhost/k4t" : process.env.DATABASE_URL,
"MONGODB_URI": testmode ? "mongodb://localhost/k4t" : process.env.MONGODB_URI,
"webhooks": {
"welcome": process.env.WEBHOOK_WELCOME.split("/"),
},
"opID": "281134216115257344",
"guildID": this.testmode ? "467473467634089985" : "321819041348190249",
"guildID": testmode ? "467473467634089985" : "321819041348190249",
"channels": { // includes voice channels & category channels
"main": this.testmode ? "467473467634089987" : "321819041348190249",
"voice": this.testmode ? "467473467634089989" : "425060452129701889",
"name_collection": this.testmode ? "467481952728121345" : '379738469511069698',
"mpp_bridges": this.testmode ? "467481904707534850" : '360557444952227851',
"user_channels": this.testmode ? "467482031157149709" : '399735134061985792',
"deleted_channels": this.testmode ? "467482085657935872" : '425054198699261953',
"deleted_bridges": this.testmode ? "467482121657778176" : '451838300068511745',
"mpp_screenshot": this.testmode ? "467482164611514388" : '383773548810076163',
"owop_screenshot": this.testmode ? "467482202217906226" : '399079481161023492'
"main": testmode ? "467473467634089987" : "321819041348190249",
"voice": testmode ? "467473467634089989" : "425060452129701889",
"name_collection": testmode ? "467481952728121345" : '379738469511069698',
"mpp_bridges": testmode ? "467481904707534850" : '360557444952227851',
"user_channels": testmode ? "467482031157149709" : '399735134061985792',
"deleted_channels": testmode ? "467482085657935872" : '425054198699261953',
"deleted_bridges": testmode ? "467482121657778176" : '451838300068511745',
"mpp_screenshot": testmode ? "467482164611514388" : '383773548810076163',
"owop_screenshot": testmode ? "467482202217906226" : '399079481161023492'
},
"roles": {
"viewing_deleted_channels": this.testmode ? "467473718353068042" : "425060792455397376",
"viewing_deleted_channels": testmode ? "467473718353068042" : "425060792455397376",
},

View File

@ -8,7 +8,7 @@ global.dClient = new Discord.Client({ disableEveryone: true });
global.dbClient = new (require('pg').Client)({
connectionString: process.env.DATABASE_URL,
ssl: !config.testmode,
ssl: !testmode,
});
dbClient.connect().then(function(){
(require('mongodb').MongoClient).connect(config.MONGODB_URI).then(client=>{