1. Fix message.mentions
This commit is contained in:
parent
4e870872f5
commit
ab113790e3
@ -12,7 +12,7 @@ const {
|
|||||||
|
|
||||||
function parseResponse(res) {
|
function parseResponse(res) {
|
||||||
if (res.headers.get('content-type').startsWith('application/json')) return res.json();
|
if (res.headers.get('content-type').startsWith('application/json')) return res.json();
|
||||||
return res.buffer();
|
return res.arrayBuffer(); // Cre: TheDevYellowy
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAPIOffset(serverDate) {
|
function getAPIOffset(serverDate) {
|
||||||
|
@ -225,7 +225,6 @@ class Message extends Base {
|
|||||||
* All valid mentions that the message contains
|
* All valid mentions that the message contains
|
||||||
* @type {MessageMentions}
|
* @type {MessageMentions}
|
||||||
*/
|
*/
|
||||||
if (!data.mentions)
|
|
||||||
this.mentions = new Mentions(
|
this.mentions = new Mentions(
|
||||||
this,
|
this,
|
||||||
data.mentions,
|
data.mentions,
|
||||||
@ -234,10 +233,6 @@ class Message extends Base {
|
|||||||
data.mention_channels,
|
data.mention_channels,
|
||||||
data.referenced_message?.author,
|
data.referenced_message?.author,
|
||||||
);
|
);
|
||||||
else
|
|
||||||
data.mentions instanceof Mentions
|
|
||||||
? (this.mentions = data.mentions)
|
|
||||||
: (this.mentions = null);
|
|
||||||
} else {
|
} else {
|
||||||
this.mentions = new Mentions(
|
this.mentions = new Mentions(
|
||||||
this,
|
this,
|
||||||
@ -491,8 +486,7 @@ class Message extends Base {
|
|||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
get url() {
|
get url() {
|
||||||
return `https://discord.com/channels/${this.guildId ?? '@me'}/${
|
return `https://discord.com/channels/${this.guildId ?? '@me'}/${this.channelId
|
||||||
this.channelId
|
|
||||||
}/${this.id}`;
|
}/${this.id}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user