aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/messageLinkEmbeds.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/messageLinkEmbeds.tsx')
-rw-r--r--src/plugins/messageLinkEmbeds.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/messageLinkEmbeds.tsx b/src/plugins/messageLinkEmbeds.tsx
index f57b5d0..bcd2fa4 100644
--- a/src/plugins/messageLinkEmbeds.tsx
+++ b/src/plugins/messageLinkEmbeds.tsx
@@ -44,7 +44,7 @@ let AutomodEmbed: React.ComponentType<any>,
Endpoints: Record<string, any>;
waitFor(["mle_AutomodEmbed"], m => (AutomodEmbed = m.mle_AutomodEmbed));
-waitFor(filters.byCode("().inlineMediaEmbed"), m => Embed = m);
+waitFor(filters.byCode(".inlineMediaEmbed"), m => Embed = m);
waitFor(m => m.type?.toString()?.includes('["message","compact","className",'), m => ChannelMessage = m);
waitFor(["MESSAGE_CREATE_ATTACHMENT_UPLOAD"], _ => Endpoints = _);
const SearchResultClasses = findByPropsLazy("message", "searchResult");
@@ -146,12 +146,12 @@ export default definePlugin({
dependencies: ["MessageAccessoriesAPI"],
patches: [
{
- find: "().embedCard",
+ find: ".embedCard",
replacement: [{
match: /{"use strict";(.{0,10})\(\)=>(.{1,2})}\);/,
replace: '{"use strict";$1()=>$2,me:()=>messageEmbed});'
}, {
- match: /function (.{1,2})\((.{1,2})\){var (.{1,2})=.{1,2}\.message,(.{1,2})=.{1,2}\.channel(.{0,300})\(\)\.embedCard(.{0,500})}\)}/,
+ match: /function (.{1,2})\((.{1,2})\){var (.{1,2})=.{1,2}\.message,(.{1,2})=.{1,2}\.channel(.{0,300})\.embedCard(.{0,500})}\)}/,
replace: "function $1($2){var $3=$2.message,$4=$2.channel$5().embedCard$6})}\
var messageEmbed={mle_AutomodEmbed:$1};"
}]