mirror of
https://gitflic.ru/project/alt-gnome/karkas.git
synced 2025-09-26 18:29:06 +03:00
Множественные мелкие исправления
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from aiogram import Dispatcher
|
||||
|
||||
from src.modules.standard.admin.routers import router as admin_router
|
||||
from src.modules.external.yandexgpt.routers import router as yandexgpt_router
|
||||
|
||||
|
||||
async def include_routers(dp: Dispatcher):
|
||||
@@ -8,4 +9,5 @@ async def include_routers(dp: Dispatcher):
|
||||
Подключение роутеров в бота
|
||||
dp.include_router()
|
||||
"""
|
||||
dp.include_router(yandexgpt_router)
|
||||
dp.include_router(admin_router)
|
@@ -18,13 +18,13 @@ def get_telegram_token() -> str:
|
||||
return config["TELEGRAM"]["TOKEN"]
|
||||
|
||||
def get_yandexgpt_token() -> str:
|
||||
return config["YANDEX_GPT_TOKEN"]
|
||||
return config["YANDEXGPT"]["TOKEN"]
|
||||
|
||||
def get_yandexgpt_catalog_id() -> str:
|
||||
return config["YANDEX_GPT_CATALOG_ID"]
|
||||
return config["YANDEXGPT"]["CATALOGID"]
|
||||
|
||||
def get_yandexgpt_prompt() -> str:
|
||||
return config["YANDEX_GPT_PROMPT"]
|
||||
return config["YANDEXGPT"]["PROMPT"]
|
||||
|
||||
def get_access_rights() -> dict:
|
||||
return get_config()["ACCESS_RIGHTS"]
|
||||
|
@@ -2,7 +2,7 @@ from aiogram.filters import BaseFilter
|
||||
from aiogram.types import Message
|
||||
from aiogram import Bot
|
||||
|
||||
from src.modules.standard.roles.api import Roles
|
||||
from src.modules.standard.roles.roles import Roles
|
||||
|
||||
class ChatModerOrAdminFilter(BaseFilter):
|
||||
async def __call__(self, message: Message, bot: Bot) -> bool:
|
||||
|
@@ -20,6 +20,6 @@ def _get_paths(path_to_json: str):
|
||||
|
||||
|
||||
cwd = os.getcwd()
|
||||
cwd = cwd[:cwd.index('/src')]
|
||||
cwd = cwd + "/src"
|
||||
|
||||
paths = _get_paths(f"{cwd}/paths.json")
|
||||
|
Reference in New Issue
Block a user