From 704d590a42f0a733c7f64124a7f645a3c1f7cb26 Mon Sep 17 00:00:00 2001 From: Soenke Date: Tue, 22 Sep 2026 23:46:31 +0200 Subject: [PATCH] fix --- cogs/database.py | 6 +++++- docker-compose.yml | 6 +----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cogs/database.py b/cogs/database.py index c0f8c0f..923bf48 100644 --- a/cogs/database.py +++ b/cogs/database.py @@ -1,12 +1,16 @@ +import os import aiosqlite +DB_PATH = "SQLite/FemBot.db" + class Database: def __init__(self): self.conn = None async def connect(self): if self.conn is None: - self.conn = await aiosqlite.connect("SQLite/FemBot.db") + os.makedirs(os.path.dirname(DB_PATH), exist_ok=True) + self.conn = await aiosqlite.connect(DB_PATH) try: await self.conn.executescript(""" diff --git a/docker-compose.yml b/docker-compose.yml index aa19148..f0c170c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,8 +6,4 @@ services: env_file: - .env volumes: - - .:/bot - - bot_data:/bot/SQLite - -volumes: - bot_data: \ No newline at end of file + - .:/bot \ No newline at end of file