mirror of
https://github.com/danbulant/discord.js
synced 2026-05-26 13:32:04 +00:00
Fix catch in _sendMessageRequest
This commit is contained in:
parent
bb0ca11776
commit
25531170ec
1 changed files with 2 additions and 2 deletions
|
|
@ -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 => {
|
||||
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue