diff --git a/list.json b/list.json index fd654d0..89ad486 100644 --- a/list.json +++ b/list.json @@ -682,7 +682,7 @@ }, { "name": "yvlu", - "version": "1.212", + "version": "1.213", "section": "chat", "maintainer": "xtaodada", "size": "10.4 kb", diff --git a/yvlu.py b/yvlu.py index ec7776a..b7b421e 100644 --- a/yvlu.py +++ b/yvlu.py @@ -7,7 +7,7 @@ from requests import get from telethon.errors import YouBlockedUserError, ForbiddenError, FloodWaitError, AuthKeyError from telethon.tl.functions.contacts import UnblockRequest from telethon.tl.functions.users import GetFullUserRequest -from telethon.tl.types import MessageMediaPhoto, MessageMediaWebPage +from telethon.tl.types import MessageMediaPhoto, MessageMediaWebPage, MessageMediaUnsupported from asyncio import TimeoutError from pagermaid import bot from pagermaid.listener import listener @@ -199,8 +199,9 @@ async def yv_lu_(context): file_name = 'plugins/yvlu/sticker.jpg' await bot.download_media(reply_message.photo, file_name) elif isinstance(reply_message.media, MessageMediaWebPage): - await context.edit('不支持的文件类型。') - return + return await context.edit('不支持的文件类型。') + elif isinstance(reply_message.media, MessageMediaUnsupported): + return await context.edit('不支持的文件类型。') elif "image" in reply_message.media.document.mime_type.split('/'): file_name = 'plugins/yvlu/sticker.jpg' await bot.download_file(reply_message.media.document, file_name)