mirror of
https://gitflic.ru/project/alt-gnome/karkas.git
synced 2024-12-24 16:44:46 +03:00
фиксит сборку
This commit is contained in:
parent
3c68318825
commit
54ebe2adbc
@ -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"))
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user