aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2023-03-02 18:49:09 +0100
committerVendicated <vendicated@riseup.net>2023-03-02 18:49:24 +0100
commit727297ec4efc2b43a953a68bfed0efe6c6fffaf3 (patch)
treeba4d71f16ae15b368db772271dcc3e490bcebb7d
parenteccc4b0be1e4d8f2d22ec404db4d93ac61e561fc (diff)
downloadVencord-727297ec4efc2b43a953a68bfed0efe6c6fffaf3.tar.gz
Vencord-727297ec4efc2b43a953a68bfed0efe6c6fffaf3.tar.bz2
Vencord-727297ec4efc2b43a953a68bfed0efe6c6fffaf3.zip
Fix messageLinkEmbeds
-rw-r--r--src/plugins/messageLinkEmbeds.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/messageLinkEmbeds.tsx b/src/plugins/messageLinkEmbeds.tsx
index a6b63d8..75b99e1 100644
--- a/src/plugins/messageLinkEmbeds.tsx
+++ b/src/plugins/messageLinkEmbeds.tsx
@@ -158,11 +158,11 @@ export default definePlugin({
{
find: ".embedCard",
replacement: [{
- match: /{"use strict";(.{0,10})\(\)=>(.{1,2})}\);/,
- replace: '{"use strict";$1()=>$2,me:()=>messageEmbed});'
+ match: /{"use strict";(.{0,10})\(\)=>(\i)}\);/,
+ replace: '{"use strict";$1()=>$2,me:()=>typeof messageEmbed !== "undefined" ? messageEmbed : null});'
}, {
- match: /function (.{1,2})\(.{1,2}\){var .{1,2}=.{1,2}\.message,.{1,2}=.{1,2}\.channel.{0,300}\.embedCard.{0,500}}\)}/,
- replace: "$&;var messageEmbed={mle_AutomodEmbed:$1};"
+ match: /function (\i)\(\i\){var \i=\i\.message,\i=\i\.channel.{0,200}\.hideTimestamp/,
+ replace: "var messageEmbed={mle_AutomodEmbed:$1};$&"
}]
}
],