Remove .file_ref since pyrogram removed it

This commit is contained in:
blank X 2020-12-24 20:18:22 +07:00
parent bb4a7d59f1
commit f85df657d1
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ async def anilist(client, message):
text = {'message': results.results[page].send_message.message, 'entities': results.results[page].send_message.entities}
try:
photo = Photo._parse(client, results.results[page].photo)
await message.reply_cached_media(photo.file_id, photo.file_ref, caption=text, parse_mode='through')
await message.reply_cached_media(photo.file_id, caption=text, parse_mode='through')
except Forbidden:
await message.reply_text(text, disable_web_page_preview=True, parse_mode='through')

View File

@ -24,7 +24,7 @@ def _generate(i):
else:
file = Animation._parse(client, result.document, result.document.attributes, 'hello.mp4')
try:
await to_reply.reply_cached_media(file.file_id, file.file_ref, caption=result.send_message.message, parse_mode=None)
await to_reply.reply_cached_media(file.file_id, caption=result.send_message.message, parse_mode=None)
except Forbidden:
await to_reply.reply_text(result.send_message.message, parse_mode=None)
return func