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

Function save

frontend/src/components/GuildScriptPage.tsx:222–240  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

220 }
221
222 async function save() {
223 const response = await session.apiClient.updateScript(currentGuildId, script.id, {
224 settings_values: newValues
225 })
226
227 if (isErrorResponse(response)) {
228 notifications.push({
229 class: "error",
230 message: "Validation errors occurred"
231 })
232
233 setApiErrorResponse(response)
234 } else {
235 notifications.push({
236 class: "success",
237 message: "Successfully saved!"
238 })
239 }
240 }
241
242 useEffect(() => {
243 async function validateScript() {

Callers 1

ScriptSettingsFunction · 0.70

Calls 2

isErrorResponseFunction · 0.85
updateScriptMethod · 0.80

Tested by

no test coverage detected