Add reload command
This commit is contained in:
parent
4026668de2
commit
0f4a61e9fa
3 changed files with 16 additions and 1 deletions
13
src/core/commands/reload.ts
Normal file
13
src/core/commands/reload.ts
Normal 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();
|
||||
},
|
||||
};
|
||||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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 () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue