mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-25 00:04:32 +00:00
yvlu fix a bug
This commit is contained in:
parent
63fb13241f
commit
1af15553ba
@ -702,7 +702,7 @@
|
||||
},
|
||||
{
|
||||
"name": "yvlu",
|
||||
"version": "1.11",
|
||||
"version": "1.12",
|
||||
"section": "chat",
|
||||
"maintainer": "xtaodada",
|
||||
"size": "4.8 kb",
|
||||
|
5
yvlu.py
5
yvlu.py
@ -5,7 +5,7 @@ from os import makedirs, remove
|
||||
from PIL import Image, ImageFont, ImageDraw
|
||||
from requests import get
|
||||
from telethon.tl.functions.users import GetFullUserRequest
|
||||
from telethon.tl.types import MessageMediaPhoto
|
||||
from telethon.tl.types import MessageMediaPhoto, MessageMediaWebPage
|
||||
from pagermaid import bot
|
||||
from pagermaid.listener import listener
|
||||
from pagermaid.utils import alias_command
|
||||
@ -159,6 +159,9 @@ async def yv_lu(context):
|
||||
if isinstance(reply_message.media, MessageMediaPhoto):
|
||||
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
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user