diff --git a/src/core/commands/reload.ts b/src/core/commands/reload.ts new file mode 100644 index 0000000..04676d8 --- /dev/null +++ b/src/core/commands/reload.ts @@ -0,0 +1,13 @@ +import { Strings } from "@core/i18n"; +import { ApplicationCommand } from "@lib/api/commands/types"; +import { BundleUpdaterManager } from "@lib/api/native/modules"; + +export default () => + { + name: "reload", + description: Strings.COMMAND_RELOAD_DESC, + options: [], + execute() { + BundleUpdaterManager.reload(); + }, + }; \ No newline at end of file diff --git a/src/core/i18n/default.json b/src/core/i18n/default.json index 665f451..054f556 100644 --- a/src/core/i18n/default.json +++ b/src/core/i18n/default.json @@ -26,6 +26,7 @@ "COMMAND_EVAL_OPT_CODE": "The code to evaluate.", "COMMAND_PLUGINS_DESC": "Send list of installed plugins.", "COMMAND_PLUGINS_OPT_EPHEMERALLY": "Send plugins list ephemerally.", + "COMMAND_RELOAD_DESC": "Reload Discord.", "COMPONENT": "Component", "CONFIRMATION_LINK_IS_A_TYPE": "This link is a **{urlType, select, plugin {Plugin} theme {Theme} other {Add-on}}**, would you like to install it?", "CONNECT_TO_DEBUG_WEBSOCKET": "Connect to debug WebSocket", diff --git a/src/lib/api/commands/index.ts b/src/lib/api/commands/index.ts index f4760ff..7a295d8 100644 --- a/src/lib/api/commands/index.ts +++ b/src/lib/api/commands/index.ts @@ -20,7 +20,8 @@ export function patchCommands() { [ require("@core/commands/eval"), require("@core/commands/debug"), - require("@core/commands/plugins") + require("@core/commands/plugins"), + require("@core/commands/reload") ].forEach(r => registerCommand(r.default())); return () => {