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:
@@ -48,9 +48,12 @@ var Message = (function (_Equality) {
|
||||
if (data.author instanceof _User2["default"]) this.author = data.author;else this.author = client.internal.users.add(new _User2["default"](data.author, client));
|
||||
|
||||
this.content = data.content;
|
||||
|
||||
var mentionData = client.internal.resolver.resolveMentions(data.content);
|
||||
this.cleanContent = mentionData[1];
|
||||
this.mentions = new _UtilCache2["default"]();
|
||||
|
||||
data.mentions.forEach(function (mention) {
|
||||
mentionData[0].forEach(function (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