refactor MediaGroup. Add database

This commit is contained in:
KatykhinAA
2024-07-20 16:54:43 +03:00
parent 54234e59ec
commit 0b7f718f8a
11 changed files with 193 additions and 92 deletions

View File

@@ -4,6 +4,8 @@ import sys
from database.db import BotDB
current_dir = os.getcwd()
class BaseDependencyFactory:
def __init__(self):
@@ -12,7 +14,7 @@ class BaseDependencyFactory:
self.config = configparser.ConfigParser()
self.config.read(config_path)
self.settings = {}
self.database = BotDB('database/tg-bot-database')
self.database = BotDB(current_dir, 'database/tg-bot-database')
for section in self.config.sections():
self.settings[section] = {}