From 721c1fa6c87e070f87832262d3a5206fc8078e62 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Tue, 24 Aug 2021 21:48:07 +0300 Subject: [PATCH] actually assign the client in the component --- src/structure/components/observers/CommandHandler.js | 2 -- src/structure/interfaces/Component.js | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structure/components/observers/CommandHandler.js b/src/structure/components/observers/CommandHandler.js index 0287d6e..c52931c 100644 --- a/src/structure/components/observers/CommandHandler.js +++ b/src/structure/components/observers/CommandHandler.js @@ -10,8 +10,6 @@ class CommandHandler extends Observer { guarded: true }); - this.client = client; - this.hooks = [ ['messageCreate', this.messageCreate.bind(this)], ['interactionCreate', this.interactionCreate.bind(this)] diff --git a/src/structure/interfaces/Component.js b/src/structure/interfaces/Component.js index 5e5ec41..8586112 100644 --- a/src/structure/interfaces/Component.js +++ b/src/structure/interfaces/Component.js @@ -3,6 +3,8 @@ class Component { constructor(client, options = {}) { if(!options) return null; + this.client = client; + this.id = options.id; //Name of the component this._type = options._type; //Type of component (command, observer, etc.)