mirror of
https://github.com/danbulant/discord.js
synced 2026-07-06 03:31:03 +00:00
Webpack build for branch master: 909b825c94
This commit is contained in:
parent
0bd109d976
commit
6c840542f6
2 changed files with 9 additions and 6 deletions
|
|
@ -227,7 +227,6 @@ const Endpoints = exports.Endpoints = {
|
||||||
permissions: `${base}/permissions`,
|
permissions: `${base}/permissions`,
|
||||||
webhooks: `${base}/webhooks`,
|
webhooks: `${base}/webhooks`,
|
||||||
search: `${base}/messages/search`,
|
search: `${base}/messages/search`,
|
||||||
ack: `${base}/ack`,
|
|
||||||
pins: `${base}/pins`,
|
pins: `${base}/pins`,
|
||||||
Pin: messageID => `${base}/pins/${messageID}`,
|
Pin: messageID => `${base}/pins/${messageID}`,
|
||||||
Recipient: recipientID => `${base}/recipients/${recipientID}`,
|
Recipient: recipientID => `${base}/recipients/${recipientID}`,
|
||||||
|
|
@ -6705,7 +6704,8 @@ class TextBasedChannel {
|
||||||
* @returns {Promise<TextChannel|GroupDMChannel|DMChannel>}
|
* @returns {Promise<TextChannel|GroupDMChannel|DMChannel>}
|
||||||
*/
|
*/
|
||||||
acknowledge() {
|
acknowledge() {
|
||||||
return this.client.rest.methods.ackTextMessage(this);
|
if (!this.lastMessageID) return Promise.resolve(this);
|
||||||
|
return this.client.rest.methods.ackTextChannel(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
_cacheMessage(message) {
|
_cacheMessage(message) {
|
||||||
|
|
@ -6800,6 +6800,7 @@ exports.applyToClass = (structure, full = false, ignore = []) => {
|
||||||
if (full) {
|
if (full) {
|
||||||
props.push(
|
props.push(
|
||||||
'_cacheMessage',
|
'_cacheMessage',
|
||||||
|
'acknowledge',
|
||||||
'fetchMessages',
|
'fetchMessages',
|
||||||
'fetchMessage',
|
'fetchMessage',
|
||||||
'search',
|
'search',
|
||||||
|
|
@ -23412,7 +23413,9 @@ class RESTMethods {
|
||||||
}
|
}
|
||||||
|
|
||||||
ackTextChannel(channel) {
|
ackTextChannel(channel) {
|
||||||
return this.rest.makeRequest('post', Endpoints.Channel(channel).ack, true, { token: this._ackToken }).then(res => {
|
return this.rest.makeRequest('post', Endpoints.Channel(channel).Message(channel.lastMessageID).ack, true, {
|
||||||
|
token: this._ackToken,
|
||||||
|
}).then(res => {
|
||||||
if (res.token) this._ackToken = res.token;
|
if (res.token) this._ackToken = res.token;
|
||||||
return channel;
|
return channel;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
6
discord.master.min.js
vendored
6
discord.master.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue