Add reload command

This commit is contained in:
kmmiio99o 2025-11-28 18:45:27 +01:00
parent 4026668de2
commit 0f4a61e9fa
3 changed files with 16 additions and 1 deletions

View file

@ -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 () =>
<ApplicationCommand>{
name: "reload",
description: Strings.COMMAND_RELOAD_DESC,
options: [],
execute() {
BundleUpdaterManager.reload();
},
};

View file

@ -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",

View file

@ -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 () => {