mirror of
https://github.com/danbulant/discord.js
synced 2026-06-24 17:21:59 +00:00
Webpack build for branch master: 5059c59a31
This commit is contained in:
parent
06e2e6ce5c
commit
42a0f9f541
2 changed files with 6 additions and 3 deletions
|
|
@ -2625,12 +2625,13 @@ class Message {
|
||||||
if (data.type === 6) this.system = true;
|
if (data.type === 6) this.system = true;
|
||||||
}
|
}
|
||||||
if (data.attachments) {
|
if (data.attachments) {
|
||||||
this.attachments = new Collection();
|
this.attachments.clear();
|
||||||
for (const attachment of data.attachments) {
|
for (const attachment of data.attachments) {
|
||||||
this.attachments.set(attachment.id, new Attachment(this, attachment));
|
this.attachments.set(attachment.id, new Attachment(this, attachment));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.mentions) {
|
if (data.mentions) {
|
||||||
|
this.mentions.users.clear();
|
||||||
for (const mention of data.mentions) {
|
for (const mention of data.mentions) {
|
||||||
let user = this.client.users.get(mention.id);
|
let user = this.client.users.get(mention.id);
|
||||||
if (user) {
|
if (user) {
|
||||||
|
|
@ -2642,6 +2643,7 @@ class Message {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.mention_roles) {
|
if (data.mention_roles) {
|
||||||
|
this.mentions.roles.clear();
|
||||||
for (const mention of data.mention_roles) {
|
for (const mention of data.mention_roles) {
|
||||||
const role = this.channel.guild.roles.get(mention);
|
const role = this.channel.guild.roles.get(mention);
|
||||||
if (role) this.mentions.roles.set(role.id, role);
|
if (role) this.mentions.roles.set(role.id, role);
|
||||||
|
|
@ -2649,6 +2651,7 @@ class Message {
|
||||||
}
|
}
|
||||||
if (data.id) this.id = data.id;
|
if (data.id) this.id = data.id;
|
||||||
if (this.channel.guild && data.content) {
|
if (this.channel.guild && data.content) {
|
||||||
|
this.mentions.channels.clear();
|
||||||
const channMentionsRaw = data.content.match(/<#([0-9]{14,20})>/g) || [];
|
const channMentionsRaw = data.content.match(/<#([0-9]{14,20})>/g) || [];
|
||||||
for (const raw of channMentionsRaw) {
|
for (const raw of channMentionsRaw) {
|
||||||
const chan = this.channel.guild.channels.get(raw.match(/([0-9]{14,20})/g)[0]);
|
const chan = this.channel.guild.channels.get(raw.match(/([0-9]{14,20})/g)[0]);
|
||||||
|
|
@ -2656,7 +2659,7 @@ class Message {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.reactions) {
|
if (data.reactions) {
|
||||||
this.reactions = new Collection();
|
this.reactions.clear();
|
||||||
if (data.reactions.length > 0) {
|
if (data.reactions.length > 0) {
|
||||||
for (const reaction of data.reactions) {
|
for (const reaction of data.reactions) {
|
||||||
const id = reaction.emoji.id ? `${reaction.emoji.name}:${reaction.emoji.id}` : reaction.emoji.name;
|
const id = reaction.emoji.id ? `${reaction.emoji.name}:${reaction.emoji.id}` : reaction.emoji.name;
|
||||||
|
|
|
||||||
2
discord.master.min.js
vendored
2
discord.master.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue