From ef38568839d1d94dd76f62ad7cb90061c251e696 Mon Sep 17 00:00:00 2001 From: amsyarasyiq <82711525+amsyarasyiq@users.noreply.github.com> Date: Mon, 15 Jan 2024 21:59:20 +0800 Subject: [PATCH] new: PyonInstaller :trollface: --- .vscode/settings.json | 2 +- plugins/PyonInstaller/manifest.json | 4 ++++ plugins/PyonInstaller/src/index.ts | 28 ++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 plugins/PyonInstaller/manifest.json create mode 100644 plugins/PyonInstaller/src/index.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index d79891c..e8028f8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,6 +3,6 @@ "editor.formatOnSave": true, "files.insertFinalNewline": true, "editor.codeActionsOnSave": { - "source.organizeImports": true, + "source.organizeImports": "explicit" }, } diff --git a/plugins/PyonInstaller/manifest.json b/plugins/PyonInstaller/manifest.json new file mode 100644 index 0000000..f03fb79 --- /dev/null +++ b/plugins/PyonInstaller/manifest.json @@ -0,0 +1,4 @@ +{ + "name": "PyoncordInstaller", + "description": "installs pyoncord.exe (virus)" +} diff --git a/plugins/PyonInstaller/src/index.ts b/plugins/PyonInstaller/src/index.ts new file mode 100644 index 0000000..1126d53 --- /dev/null +++ b/plugins/PyonInstaller/src/index.ts @@ -0,0 +1,28 @@ +import { plugin, plugins } from "@vendetta"; +import { config } from "@vendetta/loader"; +import { showConfirmationAlert } from "@vendetta/ui/alerts"; + +export default { + onLoad() { + plugins.removePlugin(plugin.id); + + setTimeout(() => showConfirmationAlert({ + title: "Install Pyoncord?", + content: "Loader's settings will be overriden to load Pyoncord instead. You may not be able to revert to Vendetta whenever Pyoncord breaks!", + confirmText: "Continue and Restart", + cancelText: "Nevermind", + onConfirm: this.install + }), 300); + }, + + async install() { + if (config.customLoadUrl) { + config.customLoadUrl.enabled = true; + config.customLoadUrl.url = "https://raw.githubusercontent.com/pyoncord/pyoncord/builds/pyoncord.js"; + + setTimeout(globalThis.nativeModuleProxy.BundleUpdaterManager.reload, 100); + } else { + alert("not a proper vendetta loader!"); + } + } +};