From 609601fd7b4ca4c4f1889c696ef046cddeae323c Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Tue, 20 Feb 2018 15:53:40 +0100 Subject: [PATCH] more things --- telethon/events/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/telethon/events/__init__.py b/telethon/events/__init__.py index abd3703e..99dd5bda 100644 --- a/telethon/events/__init__.py +++ b/telethon/events/__init__.py @@ -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: