fix
This commit is contained in:
1 parent
928b1f3893
commit
704d590a42
2 files changed
+6
-6
No files matched your search
+5
-1
@@ -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("""
|
||||
|
||||
+1
-5
@@ -6,8 +6,4 @@ services:
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- .:/bot
|
||||
- bot_data:/bot/SQLite
|
||||
|
||||
volumes:
|
||||
bot_data:
|
||||
- .:/bot
|
||||
Reference in new issue
Block a user