from aiogram import Bot
from aiogram.types.input_file import FSInputFile
from dbase.db import DataBase
import cfg

db = DataBase(file=cfg.DATABASE_URL)

async def send_db_cron(bot: Bot, ADMIN_LIST):
    for admin in ADMIN_LIST:
        try:
            document = FSInputFile(cfg.DATABASE_URL)
            await bot.send_document(admin, document, caption='📦AUTOBACKUP')
        except:
            pass
