BadgesAPI: Fix canary crash (new pomelo badge, the horror)

This commit is contained in:
V 2023-05-12 23:34:12 +02:00
parent 3da112680d
commit 2fdc00b11e
No known key found for this signature in database
GPG Key ID: A1DC0CFB5615D905

@ -82,8 +82,8 @@ export default definePlugin({
find: "Messages.PROFILE_USER_BADGES,role:", find: "Messages.PROFILE_USER_BADGES,role:",
replacement: [ replacement: [
{ {
match: /null==\i\?void 0:(\i)\.getBadges\(\)/, match: /(?<=(\i)\.isTryItOutFlow,)(.{0,300})null==\i\?void 0:(\i)\.getBadges\(\)/,
replace: (_, badgesMod) => `Vencord.Api.Badges._getBadges(arguments[0]).concat(${badgesMod}?.getBadges()??[])`, replace: (_, props, restCode, badgesMod) => `vencordProps=${props},${restCode}Vencord.Api.Badges._getBadges(vencordProps).concat(${badgesMod}?.getBadges()??[])`,
}, },
{ {
// alt: "", aria-hidden: false, src: originalSrc // alt: "", aria-hidden: false, src: originalSrc