mirror of
https://github.com/danbulant/discord.js
synced 2026-07-09 13:10:42 +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 datas = [];
|
||||||
const promise = this.rest.makeRequest('post', Constants.Endpoints.channelMessages(channel.id), true, {
|
const promise = this.rest.makeRequest('post', Constants.Endpoints.channelMessages(channel.id), true, {
|
||||||
content: content[0], tts, nonce,
|
content: content[0], tts, nonce,
|
||||||
}, file);
|
}, file).catch(reject);
|
||||||
for (let i = 1; i <= content.length; i++) {
|
for (let i = 1; i <= content.length; i++) {
|
||||||
if (i < content.length) {
|
if (i < content.length) {
|
||||||
promise.then(data => {
|
promise.then(data => {
|
||||||
|
|
@ -85,7 +85,7 @@ class RESTMethods {
|
||||||
} else {
|
} else {
|
||||||
promise.then(data => {
|
promise.then(data => {
|
||||||
datas.push(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