fix: exclude commands from message handler, remove bad register call
This commit is contained in:
parent
763eba2817
commit
5bbd336f58
2 changed files with 2 additions and 3 deletions
|
|
@ -4,7 +4,7 @@ from __future__ import annotations
|
|||
import asyncio
|
||||
|
||||
from aiogram import F, Router
|
||||
from aiogram.filters import Command
|
||||
from aiogram.filters import Command, CommandObject
|
||||
from aiogram.fsm.context import FSMContext
|
||||
from aiogram.types import CallbackQuery, Message
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ async def _send_outgoing(message: Message, chat_name: str, events: list) -> None
|
|||
await message.answer(format_outgoing(chat_name, event))
|
||||
|
||||
|
||||
@router.message(ChatState.idle, F.text | F.photo | F.document | F.voice)
|
||||
@router.message(ChatState.idle, (F.text | F.photo | F.document | F.voice) & ~F.text.startswith("/"))
|
||||
async def handle_message(
|
||||
message: Message,
|
||||
state: FSMContext,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue