фиксит сборку

This commit is contained in:
Maxim Slipenko 2024-08-22 11:49:17 +03:00
parent 3c68318825
commit 54ebe2adbc
No known key found for this signature in database
GPG Key ID: 6DEA9FA7DE98C7D6
2 changed files with 6 additions and 4 deletions

View File

@ -4,11 +4,13 @@ from typing import TYPE_CHECKING
from aiogram import Router from aiogram import Router
from aiogram.filters import Command 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 from karkas_core.modules_system.public_api import get_module, log, register_router
if TYPE_CHECKING: if TYPE_CHECKING:
from aiogram.types import ChatMemberAdministrator, Message
from karkas_blocks.standard.config import IConfig from karkas_blocks.standard.config import IConfig
from karkas_blocks.standard.filters import ChatIDFilter as IChatIDFilter from karkas_blocks.standard.filters import ChatIDFilter as IChatIDFilter
@ -29,7 +31,7 @@ except Exception:
pass pass
def can_moderate(admin: ChatMemberOwner | ChatMemberAdministrator) -> bool: def can_moderate(admin: "ChatMemberOwner | ChatMemberAdministrator") -> bool:
if isinstance(admin, ChatMemberOwner): if isinstance(admin, ChatMemberOwner):
return True return True
@ -38,7 +40,7 @@ def can_moderate(admin: ChatMemberOwner | ChatMemberAdministrator) -> bool:
) )
async def report(message: Message): async def report(message: "Message"):
try: try:
if message.reply_to_message is None: if message.reply_to_message is None:
await message.reply(config.get("report::errors::no_reply_message")) await message.reply(config.get("report::errors::no_reply_message"))

View File

@ -84,7 +84,7 @@ class Karkas:
await register_bot_webhook(app, singleton.bot, singleton.dp) await register_bot_webhook(app, singleton.bot, singleton.dp)
await singleton.bot.set_webhook(config.get("core::webhook::public_url")) await singleton.bot.set_webhook(config.get("core::webhook::public_url"))
hyperConfig = HyperConfig() 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 hyperConfig.logger_class = CustomLogger
await serve(app, hyperConfig) await serve(app, hyperConfig)