1.7.1 Production improvments

This commit is contained in:
SowinskiBraeden committed 2021-09-27 10:26:35 -07:00
1 parent f45aaf664b
commit 8dac1d4262
4 files changed
+8 -9

No files matched your search

+1
View File
@@ -6,3 +6,4 @@ test.js
# Dev version
dev.js
dev-config.json
+5 -5
View File
@@ -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
+1 -3
View File
@@ -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/"
}
+1 -1
View File
@@ -1,4 +1,4 @@
const Bot = require('./LPS').Bot;
client = new Bot('PRODUCTION', process.env.token, './config');
client = new Bot('PRODUCTION', process.env.token, './config', process.env.mongoURI, process.env.dbo);
client.main()