Initialization sequence changed slightly
This commit is contained in:
2
index.js
2
index.js
@@ -3,4 +3,4 @@ require('babel-register')({
|
||||
presets: [ 'env' ]
|
||||
});
|
||||
|
||||
require('./src/index');
|
||||
require('./src/index').init();
|
||||
|
||||
@@ -5,8 +5,9 @@ import {Config} from './config';
|
||||
import {Database} from './database/database';
|
||||
import {Events} from './events';
|
||||
|
||||
init();
|
||||
async function init() {
|
||||
let client;
|
||||
|
||||
export async function init() {
|
||||
Logger.init();
|
||||
Logger.SetLevel(Logger.VERBOSE_LOGS);
|
||||
|
||||
@@ -15,7 +16,7 @@ async function init() {
|
||||
|
||||
await Database.init();
|
||||
|
||||
const client = new Discord.Client();
|
||||
client = new Discord.Client();
|
||||
|
||||
const eventHandler = new Events();
|
||||
await eventHandler.init(client);
|
||||
|
||||
Reference in New Issue
Block a user