From 935a5eaf6e5894294ec45ec540e9ecb07e850de0 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Sun, 8 Dec 2024 21:48:47 -0500 Subject: [PATCH 1/4] FakeNitro Fix --- src/plugins/fakeNitro/index.tsx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/plugins/fakeNitro/index.tsx b/src/plugins/fakeNitro/index.tsx index 40e42f3a..6fe8adbf 100644 --- a/src/plugins/fakeNitro/index.tsx +++ b/src/plugins/fakeNitro/index.tsx @@ -17,7 +17,7 @@ */ import { addPreEditListener, addPreSendListener, removePreEditListener, removePreSendListener } from "@api/MessageEvents"; -import { definePluginSettings } from "@api/Settings"; +import { definePluginSettings, Settings } from "@api/Settings"; import { Devs } from "@utils/constants"; import { ApngBlendOp, ApngDisposeOp, importApngJs } from "@utils/dependencies"; import { getCurrentGuild, getEmojiURL } from "@utils/discord"; @@ -30,6 +30,14 @@ import type { Message } from "discord-types/general"; import { applyPalette, GIFEncoder, quantize } from "gifenc"; import type { ReactElement, ReactNode } from "react"; +let premiumType; +if (Settings.plugins.NoNitroUpsell.enabled) { + // @ts-ignore + premiumType = UserStore?.getCurrentUser()?._realPremiumType ?? UserStore?.getCurrentUser()?.premiumType ?? 0; +} else { + premiumType = UserStore?.getCurrentUser()?.premiumType ?? 0; +} + const StickerStore = findStoreLazy("StickersStore") as { getPremiumPacks(): StickerPack[]; getAllGuildStickers(): Map; @@ -412,22 +420,17 @@ export default definePlugin({ }, get canUseEmotes() { - // @ts-ignore - return (UserStore?.getCurrentUser()?._realPremiumType ?? UserStore?.getCurrentUser().premiumType ?? 0) > 0; + return (premiumType) > 0; }, get canUseStickers() { - // @ts-ignore - return (UserStore?.getCurrentUser()?._realPremiumType ?? UserStore.getCurrentUser().premiumType ?? 0) > 1; + return (premiumType) > 1; }, handleProtoChange(proto: any, user: any) { try { if (proto == null || typeof proto === "string") return; - // @ts-ignore - const premiumType: number = user?._realPremiumType ?? user?.premium_type ?? UserStore?.getCurrentUser()?.premiumType ?? 0; - if (premiumType !== 2) { proto.appearance ??= AppearanceSettingsActionCreators.create(); @@ -456,8 +459,6 @@ export default definePlugin({ }, handleGradientThemeSelect(backgroundGradientPresetId: number | undefined, theme: number, original: () => void) { - // @ts-ignore - const premiumType = UserStore?.getCurrentUser()?._realPremiumType ?? UserStore?.getCurrentUser()?.premiumType ?? 0; if (premiumType === 2 || backgroundGradientPresetId == null) return original(); if (!PreloadedUserSettingsActionCreators || !AppearanceSettingsActionCreators || !ClientThemeSettingsActionsCreators || !BINARY_READ_OPTIONS) return; @@ -917,7 +918,6 @@ export default definePlugin({ } if (s.enableEmojiBypass) { - for (const emoji of messageObj.validNonShortcutEmojis) { if (this.canUseEmote(emoji, channelId)) continue; From 1d4467433568d0a81d373d223352cdd849b28c1e Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Mon, 9 Dec 2024 02:44:52 -0500 Subject: [PATCH 2/4] v1.10.8 --- .github/workflows/build.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5dd6bdbe..3ebc493e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,8 +1,9 @@ name: Release on: push: + tags: + - v* branches: - - main - dev env: FORCE_COLOR: true @@ -68,10 +69,16 @@ jobs: rm release/package.json rm release/*.map + - name: get-npm-version + if: ${{ github.ref_name == 'main' }} + id: package-version + uses: martinbeentjes/npm-get-version-action@v1.3.1 + - name: Upload Equicord Stable if: ${{ github.ref_name == 'main' }} run: | - gh release upload latest --clobber dist/release/* + gh release create ${{ steps.package-version.outputs.current-version}} --latest=false + gh release upload ${{ steps.package-version.outputs.current-version}} --clobber dist/release/* - name: Upload Equicord Dev if: ${{ github.ref_name == 'dev' }} From ebecf29fc2ad188071e5a791b5164b918edaf328 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Mon, 9 Dec 2024 02:46:04 -0500 Subject: [PATCH 3/4] v1.10.8 One Day --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3ebc493e..31d94644 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,6 +4,7 @@ on: tags: - v* branches: + - main - dev env: FORCE_COLOR: true From 57c14fe9e017cb7d6c1d09282ee1f9519ad9a453 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Mon, 9 Dec 2024 02:48:19 -0500 Subject: [PATCH 4/4] v1.10.8 raf can be happy now --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 31d94644..3122e235 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -78,8 +78,8 @@ jobs: - name: Upload Equicord Stable if: ${{ github.ref_name == 'main' }} run: | - gh release create ${{ steps.package-version.outputs.current-version}} --latest=false - gh release upload ${{ steps.package-version.outputs.current-version}} --clobber dist/release/* + gh release create v${{ steps.package-version.outputs.current-version}} --latest=false + gh release upload v${{ steps.package-version.outputs.current-version}} --clobber dist/release/* - name: Upload Equicord Dev if: ${{ github.ref_name == 'dev' }}