5
utils.py
5
utils.py
@@ -5,7 +5,6 @@ import os
|
||||
import re
|
||||
from typing import Optional
|
||||
|
||||
from aiogram import Bot
|
||||
from colorama import Fore
|
||||
|
||||
from config import config
|
||||
@@ -41,11 +40,9 @@ def format_date(date: datetime) -> datetime:
|
||||
def parse_task_id(tag: str) -> int:
|
||||
return int(re.search(r"^(?P<task_id>\d{5})", tag).group("task_id"))
|
||||
|
||||
async def db_update(bot: Bot = None, user_id: int = None):
|
||||
def db_update():
|
||||
from config import clock, db, red
|
||||
logger.info(Fore.YELLOW + "Обновление базы данных..." + Fore.RESET)
|
||||
if bot:
|
||||
await bot.send_message(user_id, "Обновление базы данных...")
|
||||
|
||||
try:
|
||||
# Обновление Тегов
|
||||
|
||||
Reference in New Issue
Block a user