mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 04:30:22 +03:00
more things
This commit is contained in:
parent
377a9143fc
commit
609601fd7b
|
@ -174,7 +174,7 @@ class NewMessage(_EventBuilder):
|
|||
If set to ``True``, only **outgoing** messages will be handled.
|
||||
Mutually exclusive with ``incoming`` (can only set one of either).
|
||||
|
||||
pattern (:obj:`str`, :obj:`callable`, :obj:`re`, optional):
|
||||
pattern (:obj:`str`, :obj:`callable`, :obj:`Pattern`, optional):
|
||||
If set, only messages matching this pattern will be handled.
|
||||
You can specify a regex-like string which will be matched
|
||||
against the message, a callable function that returns ``True``
|
||||
|
@ -244,7 +244,8 @@ class NewMessage(_EventBuilder):
|
|||
return
|
||||
|
||||
# Short-circuit if we let pass all events
|
||||
if all(x is None for x in (self.incoming, self.outgoing, self.chats, self.pattern)):
|
||||
if all(x is None for x in (self.incoming, self.outgoing, self.chats,
|
||||
self.pattern)):
|
||||
return event
|
||||
|
||||
if self.incoming and event.message.out:
|
||||
|
|
Loading…
Reference in New Issue
Block a user