mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 08:27:38 +00:00
yvlu 修复错误
This commit is contained in:
parent
aa87765ff1
commit
f9ec8e5083
@ -682,7 +682,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "yvlu",
|
"name": "yvlu",
|
||||||
"version": "1.212",
|
"version": "1.213",
|
||||||
"section": "chat",
|
"section": "chat",
|
||||||
"maintainer": "xtaodada",
|
"maintainer": "xtaodada",
|
||||||
"size": "10.4 kb",
|
"size": "10.4 kb",
|
||||||
|
7
yvlu.py
7
yvlu.py
@ -7,7 +7,7 @@ from requests import get
|
|||||||
from telethon.errors import YouBlockedUserError, ForbiddenError, FloodWaitError, AuthKeyError
|
from telethon.errors import YouBlockedUserError, ForbiddenError, FloodWaitError, AuthKeyError
|
||||||
from telethon.tl.functions.contacts import UnblockRequest
|
from telethon.tl.functions.contacts import UnblockRequest
|
||||||
from telethon.tl.functions.users import GetFullUserRequest
|
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 asyncio import TimeoutError
|
||||||
from pagermaid import bot
|
from pagermaid import bot
|
||||||
from pagermaid.listener import listener
|
from pagermaid.listener import listener
|
||||||
@ -199,8 +199,9 @@ async def yv_lu_(context):
|
|||||||
file_name = 'plugins/yvlu/sticker.jpg'
|
file_name = 'plugins/yvlu/sticker.jpg'
|
||||||
await bot.download_media(reply_message.photo, file_name)
|
await bot.download_media(reply_message.photo, file_name)
|
||||||
elif isinstance(reply_message.media, MessageMediaWebPage):
|
elif isinstance(reply_message.media, MessageMediaWebPage):
|
||||||
await context.edit('不支持的文件类型。')
|
return await context.edit('不支持的文件类型。')
|
||||||
return
|
elif isinstance(reply_message.media, MessageMediaUnsupported):
|
||||||
|
return await context.edit('不支持的文件类型。')
|
||||||
elif "image" in reply_message.media.document.mime_type.split('/'):
|
elif "image" in reply_message.media.document.mime_type.split('/'):
|
||||||
file_name = 'plugins/yvlu/sticker.jpg'
|
file_name = 'plugins/yvlu/sticker.jpg'
|
||||||
await bot.download_file(reply_message.media.document, file_name)
|
await bot.download_file(reply_message.media.document, file_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user