Skeleton of project - database loading

This commit is contained in:
BarsTiger
2023-02-13 19:51:25 +02:00
commit f778d3f71c
23 changed files with 348 additions and 0 deletions

12
bot/db/db.py Normal file
View File

@@ -0,0 +1,12 @@
import os.path
from bot.config import DB
from .db_model import DBDict
if not os.path.isfile(DB):
open('sync', 'w')
db = {
'config': DBDict(DB, autocommit=True, tablename='config'),
'cooldown': DBDict(DB, autocommit=True, tablename='cooldown')
}