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):
|
2022-01-29 06:13:33 +00:00
|
|
|
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)
|