# - *- coding: utf- 8 - *-
from aiogram import Bot
from aiogram.types import FSInputFile
from tgbot.data.config import get_admins, PATH_DATABASE, BOT_STATUS_NOTIFICATION
from tgbot.utils.const_functions import get_date, send_admins
# Notification after run bot (for all admins)
async def startup_notify(bot: Bot):
if len(get_admins()) >= 1 and BOT_STATUS_NOTIFICATION:
await send_admins(bot, "✅ Bot was started")
# Autobackup Database
async def autobackup_admin(bot: Bot):
for admin in get_admins():
try:
await bot.send_document(
admin,
FSInputFile(PATH_DATABASE),
caption=f"📦 #AUTOBACKUP | {get_date()}",
)
except:
...