3
0
Telegram_PaimonBot/plugins/artifacts.py
2022-01-26 20:53:42 +08:00

13 lines
409 B
Python

from pyrogram import Client
from pyrogram.types import Message
from defs.artifacts import get_artifacts
async def artifacts_msg(client: Client, message: Message):
name = message.text.replace('圣遗物详情', '').strip()
text, url = await get_artifacts(name)
if url:
await message.reply_photo(photo=url, caption=text, quote=True)
else:
await message.reply(text, quote=True)