Fixed not connecting to email

This commit is contained in:
2018-10-28 13:00:56 +11:00
parent d5d0c7edd2
commit df2b9573e2
2 changed files with 17 additions and 3 deletions

View File

@ -25,7 +25,8 @@
const
Configuration = require('./../config/Configuration'),
DatabaseConnection = require('./../database/DatabaseConnection'),
Server = require('./../server/Server')
Server = require('./../server/Server'),
Email = require('./../email/Email')
;
class App {
@ -33,12 +34,14 @@ class App {
this.config = new Configuration(this);
this.database = new DatabaseConnection(this);
this.server = new Server(this);
this.email = new Email(this);
}
getConfig() { return this.config; }
getDiscord() { return this.discord; }
getDatabase() { return this.database; }
getPalaise() { return this.palaise; }
getEmail() {return this.email;}
async init() {
this.log('Starting App...');
@ -63,6 +66,16 @@ class App {
return;
}
//Connect to Email
this.log('Connecting to Email...');
try {
this.email.connect();
} catch(e) {
this.error('Failed to connect to email!');
this.error(e);
return;
}
//Start the server
this.log('Starting Server...');
try {