Discard toast on /api connect
| @@ -8514,7 +8514,7 @@ async function connectAPISlash(args, text) { | |||
| 8514 | } | 8514 | } |
| 8515 | 8515 | ||
| 8516 | const quiet = isTrueBoolean(args?.quiet); | 8516 | const quiet = isTrueBoolean(args?.quiet); |
| 8517 | quiet ? jQuery() : toastr.info(`API set to ${text}, trying to connect..`); | 8517 | const toast = quiet ? jQuery() : toastr.info(`API set to ${text}, trying to connect..`); |
| 8518 | 8518 | ||
| 8519 | try { | 8519 | try { |
| 8520 | await waitUntilCondition(() => online_status !== 'no_connection', 10000, 100); | 8520 | await waitUntilCondition(() => online_status !== 'no_connection', 10000, 100); |
| @@ -8523,6 +8523,7 @@ async function connectAPISlash(args, text) { | |||
| 8523 | console.log('Could not connect after 10 seconds, skipping.'); | 8523 | console.log('Could not connect after 10 seconds, skipping.'); |
| 8524 | } | 8524 | } |
| 8525 | 8525 | ||
| 8526 | toastr.clear(toast); | ||
| 8526 | return ''; | 8527 | return ''; |
| 8527 | } | 8528 | } |
| 8528 | 8529 | ||