Fix messageLinkEmbeds

This commit is contained in:
Vendicated 2023-03-02 18:49:09 +01:00
parent eccc4b0be1
commit 727297ec4e
No known key found for this signature in database
GPG key ID: A1DC0CFB5615D905

View file

@ -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};$&"
}]
}
],