3
0
Telegram_PaimonBot/plugins/artifacts.py

13 lines
409 B
Python
Raw Permalink Normal View History

2022-01-26 12:53:42 +00:00
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()
2022-01-26 12:53:42 +00:00
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)