From 9476e259fcf86dbe285ec9a4fa6cf99675000dc1 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Thu, 17 Apr 2025 16:38:41 -0400 Subject: [PATCH] Fix & Restrict QuestCompleter --- .../index.tsx | 26 ++----------------- .../style.css | 0 2 files changed, 2 insertions(+), 24 deletions(-) rename src/equicordplugins/{questCompleter => questCompleter.discordDesktop}/index.tsx (92%) rename src/equicordplugins/{questCompleter => questCompleter.discordDesktop}/style.css (100%) diff --git a/src/equicordplugins/questCompleter/index.tsx b/src/equicordplugins/questCompleter.discordDesktop/index.tsx similarity index 92% rename from src/equicordplugins/questCompleter/index.tsx rename to src/equicordplugins/questCompleter.discordDesktop/index.tsx index 83b62788..bd85c6d0 100644 --- a/src/equicordplugins/questCompleter/index.tsx +++ b/src/equicordplugins/questCompleter.discordDesktop/index.tsx @@ -17,17 +17,14 @@ */ import "@equicordplugins/_misc/styles.css"; +import "./style.css"; import { showNotification } from "@api/Notifications"; import { Devs } from "@utils/constants"; import { getTheme, Theme } from "@utils/discord"; import definePlugin from "@utils/types"; import { findByProps, findComponentByCodeLazy } from "@webpack"; -import { Button, ChannelStore, FluxDispatcher, Forms, GuildChannelStore, NavigationRouter, RestAPI, Tooltip, UserStore } from "@webpack/common"; - -const isApp = typeof DiscordNative !== "undefined"; - -import "./style.css"; +import { Button, ChannelStore, FluxDispatcher, GuildChannelStore, NavigationRouter, RestAPI, Tooltip, UserStore } from "@webpack/common"; const QuestIcon = findComponentByCodeLazy("10.47a.76.76"); @@ -89,13 +86,6 @@ async function openCompleteQuestUI() { }); console.log(`Spoofing video for ${applicationName}.`); } else if (taskName === "PLAY_ON_DESKTOP") { - if (!isApp) { - showNotification({ - title: `${applicationName} - Quest Completer`, - body: `${applicationName}'s quest requires the desktop app.`, - icon: icon, - }); - } RestAPI.get({ url: `/applications/public?application_ids=${applicationId}` }).then(res => { const appData = res.body[0]; const exeName = appData.executables.find(x => x.os === "win32").name.replace(">", ""); @@ -147,13 +137,6 @@ async function openCompleteQuestUI() { console.log(`Spoofed your game to ${applicationName}.`); }); } else if (taskName === "STREAM_ON_DESKTOP") { - if (!isApp) { - showNotification({ - title: `${applicationName} - Quest Completer`, - body: `${applicationName}'s quest requires the desktop app.`, - icon: icon, - }); - } const stream = ApplicationStreamingStore.getAnyStreamForUser(UserStore.getCurrentUser()?.id); if (!stream) { showNotification({ @@ -234,11 +217,6 @@ export default definePlugin({ name: "QuestCompleter", description: "A plugin to complete quests without having the game installed.", authors: [Devs.amia], - settingsAboutComponent: () => <> - - Game Quests do not work on Equibop/Web Platforms. Only Video Quests do. - - , patches: [ { find: "AppTitleBar", diff --git a/src/equicordplugins/questCompleter/style.css b/src/equicordplugins/questCompleter.discordDesktop/style.css similarity index 100% rename from src/equicordplugins/questCompleter/style.css rename to src/equicordplugins/questCompleter.discordDesktop/style.css