aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorActuallyTheSun <78964224+ActuallyTheSun@users.noreply.github.com>2023-01-07 18:17:18 +0200
committerGitHub <noreply@github.com>2023-01-07 17:17:18 +0100
commiteecc555dace0a2993d4dc9c479d11be9ac9ad042 (patch)
tree138afa28263376ed133542a0a3ac06e1652f8beb /src/plugins
parent5a3fbbfb306a4a6239eac3fad37be07b3e530ba0 (diff)
downloadVencord-eecc555dace0a2993d4dc9c479d11be9ac9ad042.tar.gz
Vencord-eecc555dace0a2993d4dc9c479d11be9ac9ad042.tar.bz2
Vencord-eecc555dace0a2993d4dc9c479d11be9ac9ad042.zip
Fix Badges & MessageLinkEmbeds (#383)
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/apiBadges.tsx2
-rw-r--r--src/plugins/messageLinkEmbeds.tsx5
2 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/apiBadges.tsx b/src/plugins/apiBadges.tsx
index d14678c..3fe2f6b 100644
--- a/src/plugins/apiBadges.tsx
+++ b/src/plugins/apiBadges.tsx
@@ -73,7 +73,7 @@ export default definePlugin({
replace: (_, imageMap, badge) => `src: ${badge}.image ?? ${imageMap}[${badge}.key], ...${badge}.props,`
},
{
- match: /spacing:(\d{1,2}),children:(.{1,40}(.{1,2})\.jsx.+?(.{1,2})\.onClick.+?\)})},/,
+ match: /spacing:(\d{1,2}),children:(.{1,40}(\i)\.jsx.+?(\i)\.onClick.+?\)})},/,
// if the badge provides it's own component, render that instead of an image
// the badge also includes info about the user that has it (type BadgeUserArgs), which is why it's passed as props
replace: (_, s, origBadgeComponent, React, badge) =>
diff --git a/src/plugins/messageLinkEmbeds.tsx b/src/plugins/messageLinkEmbeds.tsx
index bcd2fa4..d08f25e 100644
--- a/src/plugins/messageLinkEmbeds.tsx
+++ b/src/plugins/messageLinkEmbeds.tsx
@@ -151,9 +151,8 @@ export default definePlugin({
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})}\)}/,
- replace: "function $1($2){var $3=$2.message,$4=$2.channel$5().embedCard$6})}\
-var messageEmbed={mle_AutomodEmbed:$1};"
+ 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};"
}]
}
],