If set to true
, only incoming messages will be handled.
Mutually exclusive with outgoing
(can only set one of either).
If set to true
, only outgoing messages will be handled.
Mutually exclusive with incoming
(can only set one of either).
Unlike chats
, this parameter filters the senders of the
message. That is, only messages sent by these users will be
handled. Use chats
if you want private messages with this/these
users. from_users
lets you filter by messages sent by one or
more users across the desired chats (doesn't need a list).
Whether forwarded messages should be handled or not. By default,
both forwarded and normal messages are included. If it's True
only forwards will be handled. If it's False
only messages
that are not forwards will be handled.
If set, only messages matching this pattern will be handled.
May be one or more entities (username/peer/etc.), preferably IDs.
By default, only matching chats will be handled.
Whether to treat the chats as a blacklist instead of as a whitelist (default).
This means that every chat will be handled except those specified in chats
which will be ignored if blacklistChats:true
.
Generated using TypeDoc
A callable function that should accept the event as input parameter, and return a value indicating whether the event should be dispatched or not (any truthy value will do, it does not need to be a
bool
). It works like a custom filter: