diff options
author | Nuckyz <61953774+Nuckyz@users.noreply.github.com> | 2023-03-21 06:41:31 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-21 09:41:31 +0000 |
commit | a2f0c912f0f3c18e19ce2f3f62414421b3fe73cb (patch) | |
tree | 7393d82f005aaef001125aef509b84790a574c5b /src | |
parent | e29bbf73aa789f5560e37eaee0a146facd69e354 (diff) | |
download | Vencord-a2f0c912f0f3c18e19ce2f3f62414421b3fe73cb.tar.gz Vencord-a2f0c912f0f3c18e19ce2f3f62414421b3fe73cb.tar.bz2 Vencord-a2f0c912f0f3c18e19ce2f3f62414421b3fe73cb.zip |
Fix Fake Nitro making Discord unusable and ColorSighted not working sometimes (#640)
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/colorSighted.ts | 9 | ||||
-rw-r--r-- | src/plugins/fakeNitro.ts | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/colorSighted.ts b/src/plugins/colorSighted.ts index 659e341..d2fb0d6 100644 --- a/src/plugins/colorSighted.ts +++ b/src/plugins/colorSighted.ts @@ -27,11 +27,16 @@ export default definePlugin({ { find: "Masks.STATUS_ONLINE", replacement: { - // we can use global replacement here - these are specific to the status icons and are used nowhere else, - // so it keeps the patch and plugin small and simple match: /Masks\.STATUS_(?:IDLE|DND|STREAMING|OFFLINE)/g, replace: "Masks.STATUS_ONLINE" } + }, + { + find: ".AVATAR_STATUS_MOBILE_16;", + replacement: { + match: /(\.fromIsMobile,.+?)\i.status/, + replace: (_, rest) => `${rest}"online"` + } } ] }); diff --git a/src/plugins/fakeNitro.ts b/src/plugins/fakeNitro.ts index 7e583d7..df8ac77 100644 --- a/src/plugins/fakeNitro.ts +++ b/src/plugins/fakeNitro.ts @@ -211,7 +211,7 @@ export default definePlugin({ }, handleProtoChange(proto: any, user: any) { - const premiumType = user?.premium_type ?? UserStore.getCurrentUser().premiumType ?? 0; + const premiumType = user?.premium_type ?? UserStore.getCurrentUser()?.premiumType ?? 0; if (premiumType === 0) { const themeId = UserSettingsProtoStore.settings.appearance?.clientThemeSettings?.backgroundGradientPresetId?.value; |