We’ll be back soon!
+Sorry for the inconvenience but we’re performing some maintenance at the moment. If you need to you can always contact us, otherwise we’ll be back online shortly!
+— BotsCord
+diff --git a/config.js b/config.js index f5db639..a199791 100644 --- a/config.js +++ b/config.js @@ -1,4 +1,5 @@ module.exports = { + maintenance: true, mongodb: "mongodb+srv://root:RzIhDff90LKkOOjw@cluster0.jo9hd.mongodb.net/?retryWrites=true&w=majority", bot: { id: "934087523649609768", diff --git a/website/index.js b/website/index.js index 254c5b8..27389c1 100644 --- a/website/index.js +++ b/website/index.js @@ -17,6 +17,18 @@ var auth = require('./routers/auth'); var servers = require('./routers/servers'); var api = require('./routers/api'); var client = require('../index'); +app.set('view engine', 'ejs'); +app.set('views', path.join(__dirname, '/views')); +if(global.config.maintenance) { + console.log(colors.red("[MAINTENANCE]") + " Bot is in maintenance mode."); + app.get('/', (req, res) => { + res.render('maintenance'); + }) + app.listen(port, () => { + + }); + return +} passport.serializeUser(function (user, done) { done(null, user); }); @@ -62,8 +74,6 @@ app.use(passport.session()); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); // set up view engine -app.set('view engine', 'ejs'); -app.set('views', path.join(__dirname, '/views')); // set up static files app.use(express.static(path.join(__dirname, 'public'))); // Import routers diff --git a/website/views/maintenance.ejs b/website/views/maintenance.ejs new file mode 100644 index 0000000..cf65f48 --- /dev/null +++ b/website/views/maintenance.ejs @@ -0,0 +1,42 @@ + +
Sorry for the inconvenience but we’re performing some maintenance at the moment. If you need to you can always contact us, otherwise we’ll be back online shortly!
+— BotsCord
+