0
0
mirror of https://gitflic.ru/project/maks1ms/ocab.git synced 2025-11-28 10:21:55 +03:00

убрал legacy модули и отрефакторил admin, filters

This commit is contained in:
2024-07-13 17:36:34 +03:00
parent 4a609db595
commit 212c2836c9
29 changed files with 310 additions and 67 deletions

View File

@@ -5,7 +5,7 @@ from aiogram import Bot, F, Router, types
from ocab_core.logger import log
from ocab_modules.external.yandexgpt.handlers import answer_to_message
from ocab_modules.standard.config.config import (
get_aproved_chat_id,
get_approved_chat_id,
get_yandexgpt_in_words,
get_yandexgpt_start_words,
)
@@ -17,7 +17,7 @@ async def chat_check(message: types.Message):
# Если чата нет в базе данных, то проверяем его в наличии в конфиге и если он там есть то добавляем его в БД
# Если чат есть в базе данных, то pass
if get_chat(message.chat.id) is None:
if message.chat.id in get_aproved_chat_id():
if message.chat.id in get_approved_chat_id():
# print(f"Chat in approve list: {message.chat.id} {message.chat.title}")
await log(f"Chat in approve list: {message.chat.id} {message.chat.title}")
add_chat(message.chat.id, message.chat.title)