fix: markUnread
This commit is contained in:
parent
d6622eea6f
commit
1c09f6beb1
@ -66,7 +66,7 @@ class APIRequest {
|
|||||||
}
|
}
|
||||||
headers = Object.assign(headers, body.getHeaders());
|
headers = Object.assign(headers, body.getHeaders());
|
||||||
// eslint-disable-next-line eqeqeq
|
// eslint-disable-next-line eqeqeq
|
||||||
} else if (this.options.data != null || this.options.usingApplicationJson) {
|
} else if (this.options.data != null) {
|
||||||
body = this.options.data ? JSON.stringify(this.options.data) : undefined;
|
body = this.options.data ? JSON.stringify(this.options.data) : undefined;
|
||||||
headers['Content-Type'] = 'application/json';
|
headers['Content-Type'] = 'application/json';
|
||||||
} else if (this.options.body != null) {
|
} else if (this.options.body != null) {
|
||||||
|
@ -110,7 +110,6 @@ class DMChannel extends Channel {
|
|||||||
this.client.api
|
this.client.api
|
||||||
.channels(this.id)
|
.channels(this.id)
|
||||||
.call.ring.post({
|
.call.ring.post({
|
||||||
usingApplicationJson: true,
|
|
||||||
data: {
|
data: {
|
||||||
recipients: null,
|
recipients: null,
|
||||||
},
|
},
|
||||||
|
@ -999,8 +999,7 @@ class Message extends Base {
|
|||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
async markUnread() {
|
async markUnread() {
|
||||||
await this.client.api.channels[this.channelId].messages[this.id].ack({
|
await this.client.api.channels[this.channelId].messages[this.id].ack.post({
|
||||||
usingApplicationJson: true,
|
|
||||||
data: {
|
data: {
|
||||||
manual: true,
|
manual: true,
|
||||||
mention_count:
|
mention_count:
|
||||||
|
@ -215,8 +215,7 @@ class PartialGroupDMChannel extends Channel {
|
|||||||
this.client.api
|
this.client.api
|
||||||
.channels(this.id)
|
.channels(this.id)
|
||||||
.call.ring.post({
|
.call.ring.post({
|
||||||
usingApplicationJson: true,
|
body: {
|
||||||
data: {
|
|
||||||
recipients: null,
|
recipients: null,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user