Use classmethod for all Event.build

This commit is contained in:
Lonami Exo
2018-07-19 01:47:32 +02:00
parent 2d7c8908eb
commit 7f78d7ed2f
10 changed files with 79 additions and 79 deletions

View File

@@ -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