Skip to content

Commit

Permalink
Fix catch in _sendMessageRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
Gawdl3y committed Sep 14, 2016
1 parent bb0ca11 commit 2553117
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client/rest/RESTMethods.js
Expand Up @@ -73,7 +73,7 @@ class RESTMethods {
const datas = [];
const promise = this.rest.makeRequest('post', Constants.Endpoints.channelMessages(channel.id), true, {
content: content[0], tts, nonce,
}, file);
}, file).catch(reject);
for (let i = 1; i <= content.length; i++) {
if (i < content.length) {
promise.then(data => {
Expand All @@ -85,7 +85,7 @@ class RESTMethods {
} else {
promise.then(data => {
datas.push(data);
resolve(this.rest.client.actions.MessageCreate.handle(datas).messages).catch(reject);
resolve(this.rest.client.actions.MessageCreate.handle(datas).messages);
});
}
}
Expand Down

0 comments on commit 2553117

Please sign in to comment.