mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 03:22:29 +00:00
@@ -46,6 +46,8 @@ class Raw(EventBuilder):
|
||||
return update
|
||||
|
||||
def filter(self, event):
|
||||
if ((not self.types or isinstance(event, self.types))
|
||||
and (not self.func or self.func(event))):
|
||||
if not self.types or isinstance(event, self.types):
|
||||
if self.func:
|
||||
# Return the result of func directly as it may need to be awaited
|
||||
return self.func(event)
|
||||
return event
|
||||
|
Reference in New Issue
Block a user