mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
In-order + duplicate mentions, cleanContent in Messages
This commit is contained in:
@@ -27,9 +27,12 @@ export default class Message extends Equality{
|
||||
this.author = client.internal.users.add(new User(data.author, client));
|
||||
|
||||
this.content = data.content;
|
||||
|
||||
var mentionData = client.internal.resolver.resolveMentions(data.content);
|
||||
this.cleanContent = mentionData[1];
|
||||
this.mentions = new Cache();
|
||||
|
||||
data.mentions.forEach((mention) => {
|
||||
mentionData[0].forEach((mention) => {
|
||||
// this is .add and not .get because it allows the bot to cache
|
||||
// users from messages from logs who may have left the server and were
|
||||
// not previously cached.
|
||||
|
||||
Reference in New Issue
Block a user