diff options
author | Vendicated <vendicated@riseup.net> | 2022-12-20 18:03:58 +0100 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2022-12-20 18:03:58 +0100 |
commit | 9dcafbf4689d36ee790c0a81409e87326798bcf2 (patch) | |
tree | eeed036a592674a98932b35cef29a34074f770fb | |
parent | 1742bb60204a21cc11c6c19fdcd699be26cac383 (diff) | |
download | Vencord-9dcafbf4689d36ee790c0a81409e87326798bcf2.tar.gz Vencord-9dcafbf4689d36ee790c0a81409e87326798bcf2.tar.bz2 Vencord-9dcafbf4689d36ee790c0a81409e87326798bcf2.zip |
Fix Notices
Have I ever mentioned how terrible Discord's Notices code is?
-rw-r--r-- | src/plugins/apiNotices.ts | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/apiNotices.ts b/src/plugins/apiNotices.ts index a93334b..c362f76 100644 --- a/src/plugins/apiNotices.ts +++ b/src/plugins/apiNotices.ts @@ -16,12 +16,9 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import { migratePluginSettings } from "@api/settings"; import { Devs } from "@utils/constants"; import definePlugin from "@utils/types"; -migratePluginSettings("NoticesAPI", "NoticesApi"); - export default definePlugin({ name: "NoticesAPI", description: "Fixes notices being automatically dismissed", @@ -29,12 +26,12 @@ export default definePlugin({ required: true, patches: [ { - find: "updateNotice:", + find: 'displayName="NoticeStore"', replacement: [ { - match: /;(.{1,2}=null;)(?=.{0,50}updateNotice)/g, + match: /;.{1,2}=null;.{0,70}getPremiumSubscription/g, replace: - ";if(Vencord.Api.Notices.currentNotice)return !1;$1" + ";if(Vencord.Api.Notices.currentNotice)return false$&" }, { match: /(?<=NOTICE_DISMISS:function.+?){(?=if\(null==(.+?)\))/, |