From 8a7629582a718add1a60b1c7b8c292f1b091448f Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sun, 30 Aug 2015 21:59:00 +0100 Subject: [PATCH 1/2] Fixed bug which stopped file sending --- lib/Client.js | 2 +- package.json | 2 +- src/Client.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Client.js b/lib/Client.js index 1c2bb688f..e12f5a0ee 100644 --- a/lib/Client.js +++ b/lib/Client.js @@ -595,7 +595,7 @@ var Client = (function () { fstream = file; } - self.resolveDestination(destination).then(send)["catch"](error); + self.resolveDestination(destination).then(send)["catch"](bad); function send(destination) { if (self.options.queue) { diff --git a/package.json b/package.json index e5d2a0a8e..40a91a8c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "discord.js", - "version": "3.1.4", + "version": "3.1.5", "description": "A way to interface with the Discord API", "main": "./lib/index.js", "scripts": { diff --git a/src/Client.js b/src/Client.js index 31a16fdd9..72298886a 100644 --- a/src/Client.js +++ b/src/Client.js @@ -600,7 +600,7 @@ class Client { fstream = file; } - self.resolveDestination(destination).then(send).catch(error); + self.resolveDestination(destination).then(send).catch(bad); function send(destination) { if(self.options.queue){ From ebe3bd90ad17c8d2a541f598a9c22cd47510559e Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sun, 30 Aug 2015 22:03:54 +0100 Subject: [PATCH 2/2] test fix --- test/bot.1.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/bot.1.js b/test/bot.1.js index e9b9f9c9a..253e50c50 100644 --- a/test/bot.1.js +++ b/test/bot.1.js @@ -16,7 +16,7 @@ mybot.on("message", function (message) { return; } - var action1 = mybot.sendMessage(message.channel, "this is message " + 1); + var action1 = mybot.sendMessage(message.channel, "this is message " + 1); var action2 = mybot.sendMessage(message.channel, "this is message " + 2).then(log); function log() {