mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Use classmethod for all Event.build
This commit is contained in:
@@ -43,10 +43,10 @@ class InlineQuery(EventBuilder):
|
||||
else:
|
||||
raise TypeError('Invalid pattern type given')
|
||||
|
||||
@staticmethod
|
||||
def build(update):
|
||||
@classmethod
|
||||
def build(cls, update):
|
||||
if isinstance(update, types.UpdateBotInlineQuery):
|
||||
event = InlineQuery.Event(update)
|
||||
event = cls.Event(update)
|
||||
else:
|
||||
return
|
||||
|
||||
|
Reference in New Issue
Block a user