From 18fa0a85424c9146eb2475b79c3c1b5e0bb12752 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Fri, 12 Aug 2022 02:12:36 +0300 Subject: [PATCH] fixes --- telegram/commands/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/telegram/commands/__init__.py b/telegram/commands/__init__.py index 8bbd6a8..8c1b50a 100644 --- a/telegram/commands/__init__.py +++ b/telegram/commands/__init__.py @@ -2,6 +2,8 @@ from dataclasses import dataclass import typing from aiogram import Dispatcher +from aiogram.types import Message + from .test import telegram_test @@ -21,4 +23,5 @@ handlers: dict[str, Handler] = { def register_handlers(dispatcher: Dispatcher): for command, handler in handlers.items(): - dispatcher.register_message_handler(handler, commands=[command]) + dispatcher.register_message_handler(handler.function, + commands=[command])