From 54ebe2adbc735cbbea81a905b076bda0600db127 Mon Sep 17 00:00:00 2001 From: Maxim Slipenko Date: Thu, 22 Aug 2024 11:49:17 +0300 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81=D0=B8=D1=82=20=D1=81?= =?UTF-8?q?=D0=B1=D0=BE=D1=80=D0=BA=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/karkas_blocks/karkas_blocks/standard/report/main.py | 8 +++++--- src/karkas_core/karkas_core/main.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) 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)