Factor out setting entities to events

This commit is contained in:
Lonami Exo
2019-06-30 13:23:18 +02:00
parent 8c771a842f
commit aa2b3daccc
11 changed files with 69 additions and 100 deletions

View File

@@ -48,12 +48,7 @@ class InlineQuery(EventBuilder):
@classmethod
def build(cls, update):
if isinstance(update, types.UpdateBotInlineQuery):
event = cls.Event(update)
else:
return
event._entities = update._entities
return event
return cls.Event(update)
def filter(self, event):
if self.pattern: