Filter<CTX extends Context> class
abstract
Base class for all filters.
Filters are used to determine whether middleware should be executed based on the current context. They provide a clean way to conditionally execute middleware based on various criteria.
- Implementers
- AlwaysFilter
- AnimationFilter
- AnyCommandFilter
- AnyMessageFilter
- AnyTextFilter
- AudioFilter
- BotUserFilter
- BusinessConnectionFilter
- BusinessMessageFilter
- CallbackQueryFilter
- CaptionMessageFilter
- ChannelFilter
- ChannelPostFilter
- ChatBoostFilter
- ChatJoinRequestFilter
- ChatMemberFilter
- ChatSharedFilter
- ChatTypeFilter
- ChosenInlineResultFilter
- CommandFilter
- ContactFilter
- ContainsFilter
- DeleteChatPhotoFilter
- DeletedBusinessMessagesFilter
- DiceFilter
- DocumentFilter
- EditedBusinessMessageFilter
- EditedChannelPostFilter
- EditedMessageFilter
- EmojiReactionFilter
- EntityFilter
- ForumTopicClosedFilter
- ForumTopicCreatedFilter
- ForumTopicEditedFilter
- ForumTopicReopenedFilter
- ForwardedFilter
- GameFilter
- GroupChatFilter
- HashtagFilter
- HumanUserFilter
- InlineQueryFilter
- LiveLocationFilter
- LocationFilter
- MediaFilter
- MentionFilter
- MessageFilter
- MessageReactionCountFilter
- MessageReactionFilter
- MyChatMemberFilter
- NeverFilter
- NewChatPhotoFilter
- NewChatTitleFilter
- PaidMediaFilter
- PaidMediaPhotoFilter
- PaidMediaVideoFilter
- PhotoFilter
- PinnedMessageFilter
- PollAnswerFilter
- PollFilter
- PollMessageFilter
- PreCheckoutQueryFilter
- PredicateFilter
- PrivateChatFilter
- PurchasedPaidMediaFilter
- RegexFilter
- RemovedChatBoostFilter
- ReplyFilter
- ShippingQueryFilter
- StartsWithFilter
- StickerFilter
- SuccessfulPaymentFilter
- TextFilter
- TextMessageFilter
- UrlFilter
- UserFilter
- UsersSharedFilter
- VenueFilter
- VideoChatEndedFilter
- VideoChatParticipantsInvitedFilter
- VideoChatScheduledFilter
- VideoChatStartedFilter
- VideoFilter
- VideoNoteFilter
- VoiceFilter
- WebAppDataFilter
Constructors
- Filter()
-
Abstract const constructor
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
and(
Filter< CTX> other) → Filter<CTX> - Combines this filter with another using logical AND.
-
matches(
CTX ctx) → bool - Tests if this filter matches the given context.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
not(
) → Filter< CTX> - Creates a filter that matches the opposite of this filter.
-
or(
Filter< CTX> other) → Filter<CTX> - Combines this filter with another using logical OR.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator *(
Filter< CTX> other) → Filter<CTX> - Combines this filter with another using logical AND.
-
operator +(
Filter< CTX> other) → Filter<CTX> - Combines this filter with another using logical OR.
-
operator -(
Filter< CTX> other) → Filter<CTX> -
Creates a filter that matches
thisANDnot the other. -
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator unary-(
) → Filter< CTX> - Creates a filter that matches the opposite of this filter.