From 6eb6f2f4540b14284f8d5f42e8bbae1fdd20dc5d Mon Sep 17 00:00:00 2001 From: Akulij Date: Tue, 27 May 2025 15:34:50 +0500 Subject: [PATCH] fix: start bot with it's db name --- src/bot_manager.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bot_manager.rs b/src/bot_manager.rs index 8e34e73..4e05966 100644 --- a/src/bot_manager.rs +++ b/src/bot_manager.rs @@ -48,9 +48,10 @@ pub async fn create_bot(db: &mut DB, token: &str) -> BotResult { } pub async fn start_bot(bi: BotInstance, db: &mut DB) -> BotResult { + let mut db = db.clone().with_name(bi.name.clone()); let controller = BotController::with_db(db.clone(), &bi.token, &bi.script).await?; - let thread = spawn_bot_thread(controller.clone(), db).await?; + let thread = spawn_bot_thread(controller.clone(), &mut db).await?; let info = BotInfo { name: bi.name.clone(),