Filters
Table of Contents
Namespaces
- F
- Logic
Classes
- BaseFilter
- Empty-extension alias for {@see Filter} mirroring upstream's
`aiogram.filters.base.BaseFilter` import path (`aiogram/filters/base.py:9`).
- CallbackData
- Abstract base for typed callback-data payloads embedded inside
`InlineKeyboardButton::$callbackData`. Mirrors
`aiogram.filters.callback_data.CallbackData`
(`aiogram/filters/callback_data.py:34-149`).
- CallbackPrefix
- Class-level metadata carrier for `CallbackData` subclasses. Declares the
wire prefix and separator that the framework uses to pack/unpack a typed
callback-data payload.
- CallbackQueryFilter
- Dispatcher-side filter that bridges incoming `CallbackQuery` events to a
typed `CallbackData` subclass. Created via `MyCallbackData::filter()`,
not instantiated directly by user code (though direct construction is
supported for tests and Logic combinator wiring).
- ChatMemberUpdatedFilter
- Dispatcher-side filter that matches a `ChatMemberUpdated` event by
comparing the wire-level statuses of `old_chat_member` and `new_chat_member`.
- Command
- Slash-command matcher. Port of `aiogram.filters.command.Command`
(`aiogram/filters/command.py:25-198`). Accepts a message and matches its
`text` (or fallback `caption`) against one or more registered command
patterns. On match, returns `['command' => CommandObject]` so the parsed
pieces flow into the handler as a `$command` kwarg.
- CommandObject
- Readonly DTO carrying the parsed pieces of a Telegram slash-command
(`/cmd@mention args`). Produced by {@see Command}::__invoke and injected
into the handler kwargs under the `command` key.
- CommandStart
- Convenience filter that matches the `/start` command and (optionally)
enforces deep-link semantics. Port of
`aiogram.filters.command.CommandStart` (`aiogram/filters/command.py:240-303`).
- ExceptionMessageFilter
- Filter that accepts an `ErrorEvent` whose `->exception->getMessage()`
matches a regex pattern; on match, returns the match metadata as kwargs
so the dispatcher merges them into the handler invocation.
- ExceptionTypeFilter
- Filter that accepts an `ErrorEvent` whose `->exception` is an instance of
one of the registered exception class-strings.
- Filter
- Abstract base for every dispatcher-side filter. Concrete subclasses
(Command, StateFilter, ChatMemberUpdatedFilter, the Logic combinators
below, the F-DSL builders, …) implement `__invoke` to vote on whether
a handler should run for a given Telegram update.
- MagicData
- Filter that resolves a `MagicFilter` chain against the dispatch data dict,
i.e. `['event' => $event, ...$kwargs]`. Allows chain expressions to reach
into both the event payload AND the dispatcher's contextual kwargs (FSM
state, storage, bot, anything middleware injected):
- StateFilter
- Filter that matches a Telegram event against one or more FSM states.