vencord patch fixes

Co-Authored-By: sadan <117494111+sadan4@users.noreply.github.com>
This commit is contained in:
thororen 2026-08-25 11:48:36 -04:00
parent 2a65809567
commit 5e1a3f50ba
No known key found for this signature in database
2 changed files with 7 additions and 13 deletions

View file

@ -133,10 +133,9 @@ export default definePlugin({
replace: "$&.replace(/^./, c => c.toUpperCase())"
},
{
match: /"text-xxs\/normal".{0,300}?(?=null!=(\i)&&(.{0,20}\i\.\i.{0,200}?,children:).{0,15}?("span"),({className:\i\.\i,children:\["Build Override: ",\1\.id\]\})\)\}\))/,
replace: (m, _buildOverride, makeRow, component, props) => {
props = props.replace(/children:\[.+\]/, "");
return `${m},$self.makeInfoElements(${component},${props}).map(e=>${makeRow}e})),`;
match: /"text-xxs\/normal".{0,300}?(?=null!=(\i)&&(.{0,20}\i\.\i.{0,200}?,children:).{0,15}?("span"),{className:(\i\.\i),children:\["Build Override: ",\1\.id,\i\]\}\)\}\))/,
replace: (m, _buildOverride, makeRow, component, className) => {
return `${m},$self.makeInfoElements(${component},${className}).map(e=>${makeRow}e})),`;
}
},
{
@ -327,14 +326,9 @@ export default definePlugin({
return "\n" + this.getInfoRows().join("\n");
},
makeInfoElements(
Component: ComponentType<React.PropsWithChildren>,
props: PropsWithChildren,
) {
makeInfoElements(Component: ComponentType<PropsWithChildren<{ className?: string; }>>, className: string) {
return this.getInfoRows().map((text, i) => (
<Component key={i} {...props}>
{text}
</Component>
<Component key={i} className={className}>{text}</Component>
));
},
});

View file

@ -265,8 +265,8 @@ export default definePlugin({
},
{
// Disallow the emoji for premium locked if the intention doesn't allow it
match: /!(\i\.\i\.canUseEmojisEverywhere\(\i\))/,
replace: m => `(${m}&&!${IS_BYPASSEABLE_INTENTION})`
match: /(?<=!\(\i\|\|)\i\.\i\.canUseEmojisEverywhere\(\i\)/,
replace: check => `(${check}&&!${IS_BYPASSEABLE_INTENTION})`
},
{
// Allow animated emojis to be used if the intention allows it