()
| 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() { |
no test coverage detected