MCPcopy Create free account
hub / github.com/GCWing/BitFun / remote_connect_stop_bot

Function remote_connect_stop_bot

src/apps/desktop/src/api/remote_connect_api.rs:556–567  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

554
555#[tauri::command]
556pub async fn remote_connect_stop_bot() -> Result<(), String> {
557 let holder = get_service_holder();
558 let guard = holder.read().await;
559 if let Some(service) = guard.as_ref() {
560 service.stop_bots().await;
561 }
562 // Remove persistence so the bot is not auto-restored
563 let mut data = bot::load_bot_persistence();
564 data.connections.clear();
565 bot::save_bot_persistence(&data);
566 Ok(())
567}
568
569#[tauri::command]
570pub async fn remote_connect_status() -> Result<RemoteConnectStatusResponse, String> {

Callers

nothing calls this directly

Calls 6

get_service_holderFunction · 0.85
load_bot_persistenceFunction · 0.85
save_bot_persistenceFunction · 0.85
stop_botsMethod · 0.80
readMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected