mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2025-01-24 12:58:28 +01:00
Split message mentions up into different parts
This commit is contained in:
parent
b45270c7e2
commit
6a2a3d1f34
@ -688,9 +688,11 @@
|
|||||||
if (mention.nickname) {
|
if (mention.nickname) {
|
||||||
username = mention.nickname;
|
username = mention.nickname;
|
||||||
}
|
}
|
||||||
message.content = message.content.replace(new RegExp("<@" + mention.id + ">", 'g'), "@" + username + "#" + mention.discriminator);
|
console.log(message.content)
|
||||||
message.content = message.content.replace(new RegExp("<@!" + mention.id + ">", 'g'), "@" + username + "#" + mention.discriminator);
|
var templ = "<span class=\"mention\">@<span class=\"username\">" + username + "</span><span class=\"discriminator\">#" + mention.discriminator + "</span></span>";
|
||||||
message.content = message.content.replace("<@&" + guild_id + ">", "@everyone");
|
message.content = message.content.replace(new RegExp("<@" + mention.id + ">", 'g'), templ);
|
||||||
|
message.content = message.content.replace(new RegExp("<@!" + mention.id + ">", 'g'), templ);
|
||||||
|
message.content = message.content.replace("<@&" + guild_id + ">", "@everyone");
|
||||||
}
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
@ -901,12 +903,12 @@
|
|||||||
} else {
|
} else {
|
||||||
var avatar = global_guest_icon;
|
var avatar = global_guest_icon;
|
||||||
}
|
}
|
||||||
message = replace_message_mentions(message);
|
|
||||||
message = format_bot_message(message);
|
message = format_bot_message(message);
|
||||||
message = parse_message_time(message);
|
message = parse_message_time(message);
|
||||||
message.content = message.content.replaceAll("\\<", "<");
|
message.content = message.content.replaceAll("\\<", "<");
|
||||||
message.content = message.content.replaceAll("\\>", ">");
|
message.content = message.content.replaceAll("\\>", ">");
|
||||||
message.content = escapeHtml(message.content);
|
message.content = escapeHtml(message.content);
|
||||||
|
message = replace_message_mentions(message);
|
||||||
message = parse_message_attachments(message);
|
message = parse_message_attachments(message);
|
||||||
message.content = parse_message_markdown(message.content);
|
message.content = parse_message_markdown(message.content);
|
||||||
message = parse_channels_in_message(message);
|
message = parse_channels_in_message(message);
|
||||||
|
Loading…
Reference in New Issue
Block a user