From eda98c6339423b66cdce62bf2fb0d1f73bd3129f Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Fri, 1 Feb 2019 17:28:56 +0000 Subject: [PATCH] Dont parse message author if it starts with a mention --- webapp/titanembeds/static/js/embed.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/titanembeds/static/js/embed.js b/webapp/titanembeds/static/js/embed.js index e8bb5c3..edb4561 100644 --- a/webapp/titanembeds/static/js/embed.js +++ b/webapp/titanembeds/static/js/embed.js @@ -1169,7 +1169,7 @@ } function format_bot_message(message) { - if (message.author.id == bot_client_id && (message.content.includes("**") && ( (message.content.includes("<")&&message.content.includes(">")) || (message.content.includes("[") && message.content.includes("]")) ))) { + if (message.author.id == bot_client_id && (message.content.includes("**") && ( (message.content.includes("<")&&message.content.includes(">")&&!message.content.startsWith("<@")) || (message.content.includes("[") && message.content.includes("]")) ))) { var usernamefield = message.content.substring(getPosition(message.content, "**", 1)+3, getPosition(message.content, "**", 2)-1); if (message.content.startsWith("(Titan Dev) ")) { message.content = message.content.substring(usernamefield.length + 18);