From 6b26d28c06474806368130f5b4a4db80a7cd484f Mon Sep 17 00:00:00 2001 From: SpaceEEC Date: Tue, 14 Mar 2017 22:58:21 +0100 Subject: [PATCH] Fix (#1262) Not ignoring the filterOld boolean when a number is being passed instead of collection or array --- src/structures/interface/TextBasedChannel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 9ce76ec33..05169e5a6 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -395,7 +395,7 @@ class TextBasedChannel { * @returns {Promise>} Deleted messages */ bulkDelete(messages, filterOld = false) { - if (!isNaN(messages)) return this.fetchMessages({ limit: messages }).then(msgs => this.bulkDelete(msgs)); + if (!isNaN(messages)) return this.fetchMessages({ limit: messages }).then(msgs => this.bulkDelete(msgs, filterOld)); if (messages instanceof Array || messages instanceof Collection) { const messageIDs = messages instanceof Collection ? messages.keyArray() : messages.map(m => m.id); return this.client.rest.methods.bulkDeleteMessages(this, messageIDs, filterOld);