mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-09 06:33:03 -04:00
This commit is contained in:
parent
1a8ea79d48
commit
9476e259fc
2 changed files with 2 additions and 24 deletions
|
@ -17,17 +17,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import "@equicordplugins/_misc/styles.css";
|
import "@equicordplugins/_misc/styles.css";
|
||||||
|
import "./style.css";
|
||||||
|
|
||||||
import { showNotification } from "@api/Notifications";
|
import { showNotification } from "@api/Notifications";
|
||||||
import { Devs } from "@utils/constants";
|
import { Devs } from "@utils/constants";
|
||||||
import { getTheme, Theme } from "@utils/discord";
|
import { getTheme, Theme } from "@utils/discord";
|
||||||
import definePlugin from "@utils/types";
|
import definePlugin from "@utils/types";
|
||||||
import { findByProps, findComponentByCodeLazy } from "@webpack";
|
import { findByProps, findComponentByCodeLazy } from "@webpack";
|
||||||
import { Button, ChannelStore, FluxDispatcher, Forms, GuildChannelStore, NavigationRouter, RestAPI, Tooltip, UserStore } from "@webpack/common";
|
import { Button, ChannelStore, FluxDispatcher, GuildChannelStore, NavigationRouter, RestAPI, Tooltip, UserStore } from "@webpack/common";
|
||||||
|
|
||||||
const isApp = typeof DiscordNative !== "undefined";
|
|
||||||
|
|
||||||
import "./style.css";
|
|
||||||
|
|
||||||
const QuestIcon = findComponentByCodeLazy("10.47a.76.76");
|
const QuestIcon = findComponentByCodeLazy("10.47a.76.76");
|
||||||
|
|
||||||
|
@ -89,13 +86,6 @@ async function openCompleteQuestUI() {
|
||||||
});
|
});
|
||||||
console.log(`Spoofing video for ${applicationName}.`);
|
console.log(`Spoofing video for ${applicationName}.`);
|
||||||
} else if (taskName === "PLAY_ON_DESKTOP") {
|
} 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 => {
|
RestAPI.get({ url: `/applications/public?application_ids=${applicationId}` }).then(res => {
|
||||||
const appData = res.body[0];
|
const appData = res.body[0];
|
||||||
const exeName = appData.executables.find(x => x.os === "win32").name.replace(">", "");
|
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}.`);
|
console.log(`Spoofed your game to ${applicationName}.`);
|
||||||
});
|
});
|
||||||
} else if (taskName === "STREAM_ON_DESKTOP") {
|
} 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);
|
const stream = ApplicationStreamingStore.getAnyStreamForUser(UserStore.getCurrentUser()?.id);
|
||||||
if (!stream) {
|
if (!stream) {
|
||||||
showNotification({
|
showNotification({
|
||||||
|
@ -234,11 +217,6 @@ export default definePlugin({
|
||||||
name: "QuestCompleter",
|
name: "QuestCompleter",
|
||||||
description: "A plugin to complete quests without having the game installed.",
|
description: "A plugin to complete quests without having the game installed.",
|
||||||
authors: [Devs.amia],
|
authors: [Devs.amia],
|
||||||
settingsAboutComponent: () => <>
|
|
||||||
<Forms.FormText className="plugin-warning">
|
|
||||||
Game Quests do not work on Equibop/Web Platforms. Only Video Quests do.
|
|
||||||
</Forms.FormText>
|
|
||||||
</>,
|
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: "AppTitleBar",
|
find: "AppTitleBar",
|
Loading…
Add table
Add a link
Reference in a new issue