aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/isWeb.ts1
-rw-r--r--src/utils/types.ts4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/utils/isWeb.ts b/src/utils/isWeb.ts
new file mode 100644
index 0000000..4082164
--- /dev/null
+++ b/src/utils/isWeb.ts
@@ -0,0 +1 @@
+export const IS_WEB = window.IS_WEB = typeof window.DiscordNative === "undefined";
diff --git a/src/utils/types.ts b/src/utils/types.ts
index a6b79c5..1c63613 100644
--- a/src/utils/types.ts
+++ b/src/utils/types.ts
@@ -33,6 +33,10 @@ interface PluginDef {
patches?: Omit<Patch, "plugin">[];
dependencies?: string[],
required?: boolean;
+ /**
+ * Set this if your plugin only works on Browser or Desktop, not both
+ */
+ target?: "WEB" | "DESKTOP" | "BOTH";
}
export type IpcRes<V = any> = { ok: true; value: V; } | { ok: false, error: any; };