Add missing async and await keywords

This commit is contained in:
Dan 2019-08-23 12:25:09 +02:00 committed by GitHub
parent 2031df15fe
commit fe6c5e542d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,7 +91,7 @@ class InlineQueryResultPhoto(InlineQueryResult):
self.reply_markup = reply_markup self.reply_markup = reply_markup
self.input_message_content = input_message_content self.input_message_content = input_message_content
def write(self): async def write(self):
photo = types.InputWebDocument( photo = types.InputWebDocument(
url=self.photo_url, url=self.photo_url,
size=0, size=0,
@ -117,7 +117,7 @@ class InlineQueryResultPhoto(InlineQueryResult):
thumb=thumb, thumb=thumb,
content=photo, content=photo,
send_message=( send_message=(
self.input_message_content.write(self.reply_markup) await self.input_message_content.write(self.reply_markup)
if self.input_message_content if self.input_message_content
else types.InputBotInlineMessageMediaAuto( else types.InputBotInlineMessageMediaAuto(
reply_markup=self.reply_markup.write() if self.reply_markup else None, reply_markup=self.reply_markup.write() if self.reply_markup else None,