From 90312952d91c6cf8fdea891f5cdc2478c81cec0d Mon Sep 17 00:00:00 2001 From: SpaceEEC Date: Fri, 4 May 2018 16:44:06 +0200 Subject: [PATCH] revert: "Improved TextBasedChannel#send (#2537)" This reverts commit 556e679bdb4346ae286bcb66aee51d8267e20778, which broke resolving of non object literal message options. --- src/structures/interfaces/TextBasedChannel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/interfaces/TextBasedChannel.js b/src/structures/interfaces/TextBasedChannel.js index b8a201ab5..9659a61c0 100644 --- a/src/structures/interfaces/TextBasedChannel.js +++ b/src/structures/interfaces/TextBasedChannel.js @@ -107,8 +107,8 @@ class TextBasedChannel { * .then(console.log) * .catch(console.error); */ - send(content, options) { - if (content && content.constructor === Object && !options) { + send(content, options) { // eslint-disable-line complexity + if (!options && typeof content === 'object' && !(content instanceof Array)) { options = content; content = null; } else if (!options) {