From 33da485768712fc6942956a300ea66853713a78f Mon Sep 17 00:00:00 2001 From: chrisnov-it Date: Tue, 19 May 2026 18:00:34 +0800 Subject: [PATCH] Fix database init path to project root --- core/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/__init__.py b/core/__init__.py index a03195b..1795225 100644 --- a/core/__init__.py +++ b/core/__init__.py @@ -72,7 +72,9 @@ def init_database(): else: # Running as script base_dir = os.path.dirname(os.path.abspath(__file__)) - db_path = os.path.join(base_dir, '..', '..', 'bots.db') + # core/__init__.py berada di /core, + # jadi naik satu level untuk mencapai root project. + db_path = os.path.join(base_dir, '..', 'bots.db') # Create connection conn = sqlite3.connect(db_path)