From 5c9cf2a3104ea0cc77220af2f266d51c5b93a72b Mon Sep 17 00:00:00 2001 From: plane000 Date: Fri, 26 Oct 2018 21:14:40 +0100 Subject: [PATCH] Fixed bug where 'on' from the discord client was undefined --- src/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index b8e4d20..533e9e9 100644 --- a/src/index.js +++ b/src/index.js @@ -18,6 +18,8 @@ async function init() { // Logger.debug(JSON.stringify(await Database.Guilds.deleteGuild(1234), null, 4)); const client = new Discord.Client(); - const eventHandler = new Events(client); + + const eventHandler = new Events(); + await eventHandler.init(client); eventHandler.handle(); }