From 53420fa4e7f3ef0e8ee361ed5aec23e02580b0ad Mon Sep 17 00:00:00 2001 From: Lewdcario Date: Fri, 21 Sep 2018 23:02:31 -0500 Subject: [PATCH] fix: Webhook#send not resolving content --- src/structures/Webhook.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index a719249ea..f48a51061 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -1,6 +1,6 @@ const DataResolver = require('../util/DataResolver'); const Channel = require('./Channel'); -const APIMessage = require('./APIMessage'); +let APIMessage; /** * Represents a webhook. @@ -15,6 +15,7 @@ class Webhook { */ Object.defineProperty(this, 'client', { value: client }); if (data) this._patch(data); + if (!APIMessage) APIMessage = require('./APIMessage'); } _patch(data) { @@ -128,7 +129,7 @@ class Webhook { async send(content, options) { let apiMessage; - if (content instanceof apiMessage) { + if (content instanceof APIMessage) { apiMessage = content.resolveData(); } else { apiMessage = APIMessage.create(this, content, options).resolveData();