diff options
author | Vendicated <vendicated@riseup.net> | 2023-01-07 03:19:28 +0100 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2023-01-07 03:19:37 +0100 |
commit | 8113ed3c8cbc8894607b7d4ed6d5bb770f1a345e (patch) | |
tree | c9d477c8091d2ce7ba7d233cd1befc1538450309 /src/plugins/messageLinkEmbeds.tsx | |
parent | b8ed72286bfca5cbcae55ca37c5968079e43a352 (diff) | |
download | Vencord-8113ed3c8cbc8894607b7d4ed6d5bb770f1a345e.tar.gz Vencord-8113ed3c8cbc8894607b7d4ed6d5bb770f1a345e.tar.bz2 Vencord-8113ed3c8cbc8894607b7d4ed6d5bb770f1a345e.zip |
Fix canary
Diffstat (limited to 'src/plugins/messageLinkEmbeds.tsx')
-rw-r--r-- | src/plugins/messageLinkEmbeds.tsx | 6 |
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};" }] |