Skeleton of project - database loading
This commit is contained in:
12
bot/db/db.py
Normal file
12
bot/db/db.py
Normal 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')
|
||||
}
|
||||
Reference in New Issue
Block a user