MCPcopy
hub / github.com/AstrBotDevs/AstrBot / reloadPlugin

Function reloadPlugin

dashboard/src/views/extension/useExtensionPage.js:1120–1132  ·  view source on GitHub ↗
(plugin_name)

Source from the content-addressed store, hash-verified

1118 };
1119
1120 const reloadPlugin = async (plugin_name) => {
1121 try {
1122 const res = await pluginApi.reload(plugin_name);
1123 if (res.data.status === "error") {
1124 toast(res.data.message || tm("messages.reloadFailed"), "error");
1125 return;
1126 }
1127 toast(tm("messages.reloadSuccess"), "success");
1128 await getExtensions();
1129 } catch (err) {
1130 toast(resolveErrorMessage(err, tm("messages.reloadFailed")), "error");
1131 }
1132 };
1133
1134 const viewReadme = (plugin) => {
1135 readmeDialog.pluginName = plugin.name;

Callers

nothing calls this directly

Calls 5

resolveErrorMessageFunction · 0.90
tmFunction · 0.85
getExtensionsFunction · 0.85
toastFunction · 0.70
reloadMethod · 0.45

Tested by

no test coverage detected