1
0
Fork 1
mirror of https://github.com/Vendicated/Vencord.git synced 2025-01-11 02:16:23 +00:00

fix: NoticesAPI (#1863)

This commit is contained in:
redstonekasi 2023-10-25 17:19:53 +02:00 committed by Luna
parent ebc73026b3
commit 2d66eba24e

View file

@ -29,12 +29,12 @@ export default definePlugin({
find: 'displayName="NoticeStore"',
replacement: [
{
match: /(?=;\i=null;.{0,70}getPremiumSubscription)/g,
replace: ";if(Vencord.Api.Notices.currentNotice)return false"
match: /\i=null;(?=.{0,80}getPremiumSubscription\(\))/g,
replace: "if(Vencord.Api.Notices.currentNotice)return false;$&"
},
{
match: /(?<=,NOTICE_DISMISS:function\(\i\){)(?=if\(null==(\i)\))/,
replace: (_, notice) => `if(${notice}.id=="VencordNotice")return(${notice}=null,Vencord.Api.Notices.nextNotice(),true);`
match: /(?<=,NOTICE_DISMISS:function\(\i\){)return null!=(\i)/,
replace: "if($1.id==\"VencordNotice\")return($1=null,Vencord.Api.Notices.nextNotice(),true);$&"
}
]
}