diff --git a/src/karkas_blocks/karkas_blocks/standard/report/main.py b/src/karkas_blocks/karkas_blocks/standard/report/main.py index 6da63ab..0ba587c 100644 --- a/src/karkas_blocks/karkas_blocks/standard/report/main.py +++ b/src/karkas_blocks/karkas_blocks/standard/report/main.py @@ -4,11 +4,13 @@ from typing import TYPE_CHECKING from aiogram import Router from aiogram.filters import Command -from aiogram.types import ChatMemberAdministrator, ChatMemberOwner, Message +from aiogram.types import ChatMemberOwner from karkas_core.modules_system.public_api import get_module, log, register_router if TYPE_CHECKING: + from aiogram.types import ChatMemberAdministrator, Message + from karkas_blocks.standard.config import IConfig from karkas_blocks.standard.filters import ChatIDFilter as IChatIDFilter @@ -29,7 +31,7 @@ except Exception: pass -def can_moderate(admin: ChatMemberOwner | ChatMemberAdministrator) -> bool: +def can_moderate(admin: "ChatMemberOwner | ChatMemberAdministrator") -> bool: if isinstance(admin, ChatMemberOwner): return True @@ -38,7 +40,7 @@ def can_moderate(admin: ChatMemberOwner | ChatMemberAdministrator) -> bool: ) -async def report(message: Message): +async def report(message: "Message"): try: if message.reply_to_message is None: await message.reply(config.get("report::errors::no_reply_message")) diff --git a/src/karkas_core/karkas_core/main.py b/src/karkas_core/karkas_core/main.py index 95a8764..05eb1bb 100644 --- a/src/karkas_core/karkas_core/main.py +++ b/src/karkas_core/karkas_core/main.py @@ -84,7 +84,7 @@ class Karkas: await register_bot_webhook(app, singleton.bot, singleton.dp) await singleton.bot.set_webhook(config.get("core::webhook::public_url")) hyperConfig = HyperConfig() - hyperConfig.bind = [f"0.0.0.0:{config.get("core::webhook::port")}"] + hyperConfig.bind = [f"0.0.0.0:{config.get('core::webhook::port')}"] hyperConfig.logger_class = CustomLogger await serve(app, hyperConfig)