1.7.1 Production improvments
This commit is contained in:
1 parent
f45aaf664b
commit
8dac1d4262
4 files changed
+10
-11
No files matched your search
+2
-1
@@ -5,4 +5,5 @@ node_modules/*
|
||||
test.js
|
||||
|
||||
# Dev version
|
||||
dev.js
|
||||
dev.js
|
||||
dev-config.json
|
||||
@@ -6,16 +6,16 @@ const client = new Discord.Client();
|
||||
|
||||
class Bot {
|
||||
|
||||
constructor(dev, token, config) {
|
||||
constructor(dev, token, config, mongoURI, dbo) {
|
||||
this.dev = dev;
|
||||
this.token = token;
|
||||
this.config = require(config);
|
||||
this.connectMongo();
|
||||
this.connectMongo(mongoURI, dbo);
|
||||
}
|
||||
|
||||
async connectMongo() {
|
||||
this.db = await MongoClient.connect(this.config.mongoURI,{useUnifiedTopology:true});
|
||||
this.dbo = this.db.db(this.config.dbo);
|
||||
async connectMongo(mongoURI, dbo) {
|
||||
this.db = await MongoClient.connect(mongoURI,{useUnifiedTopology:true});
|
||||
this.dbo = this.db.db(dbo);
|
||||
}
|
||||
|
||||
// Updates Prefix
|
||||
|
||||
+2
-4
@@ -1,8 +1,6 @@
|
||||
{
|
||||
"defaultPrefix": "?",
|
||||
"botID": "860298681047056434",
|
||||
"mongoURI": "mongodb+srv://lps_bot:ktSkHml2BU9EIQ0a@heroku-police-cad-dev.j7aom.mongodb.net/heroku_8pc4g86l?retryWrites=true&w=majority",
|
||||
"version": "Beta 1.7.0",
|
||||
"socket": "https://police-cad-dev.herokuapp.com/",
|
||||
"dbo": "heroku_8pc4g86l"
|
||||
}
|
||||
"socket": "https://police-cad-dev.herokuapp.com/"
|
||||
}
|
||||
Reference in new issue
Block a user