MCPcopy Create free account
hub / github.com/Botloader/botloader / toggleScript

Function toggleScript

frontend/src/modules/guilds/GuildScriptsProvider.tsx:58–65  ·  view source on GitHub ↗
(scriptId: number, enabled: boolean)

Source from the content-addressed store, hash-verified

56 }
57
58 async function toggleScript(scriptId: number, enabled: boolean) {
59 let resp = await session.apiClient.updateScript(safeGuildId, scriptId, {
60 enabled,
61 });
62 if (!isErrorResponse(resp)) {
63 fetchedData.reload();
64 }
65 }
66
67 async function createScript(name: string) {
68 let resp = await session.apiClient.createScript(safeGuildId, {

Callers 1

ScriptEnableToggleFunction · 0.50

Calls 2

isErrorResponseFunction · 0.85
updateScriptMethod · 0.80

Tested by

no test coverage detected