This commit is contained in:
Soenke committed 2026-09-22 23:46:31 +02:00
1 parent 928b1f3893
commit 704d590a42
2 files changed
+6 -6

No files matched your search

+5 -1
View File
@@ -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("""