Что делать если кнопка и какий handler ейо обробяет ?
что ему надо @dp.message_handler(F.text.startswith('/')) async def unknown_command(message: Message): await message.answer('Неизвестная команда') Traceback (most recent call last): File "D:\tg_projects\anon_chat_bot\main.py", line 138, in <module> async def unknown_command(message: Message): File "D:\tg_projects\anon_chat_bot\venv\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 560, in decorator self.register_message_handler(callback, *custom_filters, File "D:\tg_projects\anon_chat_bot\venv\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 486, in register_message_handler self.message_handlers.register(self._wrap_async_task(callback, run_task), filters_set) File "D:\tg_projects\anon_chat_bot\venv\lib\site-packages\aiogram\dispatcher\handler.py", line 62, in register filters = get_filters_spec(self.dispatcher, filters) File "D:\tg_projects\anon_chat_bot\venv\lib\site-packages\aiogram\dispatcher\filters\filters.py", line 43, in get_filters_spec data.append(get_filter_spec(dispatcher, i)) File "D:\tg_projects\anon_chat_bot\venv\lib\site-packages\aiogram\dispatcher\filters\filters.py", line 28, in get_filter_spec spec = inspect.getfullargspec(filter_) File "D:\Apps\Python\lib\inspect.py", line 1295, in getfullargspec raise TypeError('unsupported callable') from ex TypeError: unsupported callable
Двойка? Если да то чем тебе Text(startswith= "/") не угодил?
Обсуждают сегодня