mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-06 15:14:52 +00:00
Merge remote-tracking branch 'origin/asyncio-dev' into asyncio-dev
This commit is contained in:
commit
5f944056cc
2 changed files with 4 additions and 4 deletions
|
|
@ -29,7 +29,7 @@ class IterDialogs(BaseClient):
|
||||||
async def iter_dialogs(
|
async def iter_dialogs(
|
||||||
self,
|
self,
|
||||||
limit: int = 0,
|
limit: int = 0,
|
||||||
offset_date: int = None
|
offset_date: int = 0
|
||||||
) -> Optional[Generator["pyrogram.Dialog", None, None]]:
|
) -> Optional[Generator["pyrogram.Dialog", None, None]]:
|
||||||
"""Iterate through a user's dialogs sequentially.
|
"""Iterate through a user's dialogs sequentially.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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,11 +117,11 @@ 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,
|
||||||
**(Parser(None)).parse(self.caption, self.parse_mode)
|
**await(Parser(None)).parse(self.caption, self.parse_mode)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue