mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2025-01-24 04:48:27 +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) {
|
||||
username = mention.nickname;
|
||||
}
|
||||
message.content = message.content.replace(new RegExp("<@" + mention.id + ">", 'g'), "@" + username + "#" + mention.discriminator);
|
||||
message.content = message.content.replace(new RegExp("<@!" + mention.id + ">", 'g'), "@" + username + "#" + mention.discriminator);
|
||||
message.content = message.content.replace("<@&" + guild_id + ">", "@everyone");
|
||||
console.log(message.content)
|
||||
var templ = "<span class=\"mention\">@<span class=\"username\">" + username + "</span><span class=\"discriminator\">#" + mention.discriminator + "</span></span>";
|
||||
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;
|
||||
}
|
||||
@ -901,12 +903,12 @@
|
||||
} else {
|
||||
var avatar = global_guest_icon;
|
||||
}
|
||||
message = replace_message_mentions(message);
|
||||
message = format_bot_message(message);
|
||||
message = parse_message_time(message);
|
||||
message.content = message.content.replaceAll("\\<", "<");
|
||||
message.content = message.content.replaceAll("\\>", ">");
|
||||
message.content = escapeHtml(message.content);
|
||||
message = replace_message_mentions(message);
|
||||
message = parse_message_attachments(message);
|
||||
message.content = parse_message_markdown(message.content);
|
||||
message = parse_channels_in_message(message);
|
||||
|
Loading…
Reference in New Issue
Block a user