3
0
Telegram_PaimonBot/plugins/weapons.py
Xtao_dada 5eeea30fdc
v0.1.0beta (#1)
*  支持生成原神黄历
*  支持每日副本查询
*  支持角色资料、命座查询
*  支持武器查询
2021-07-09 23:31:30 +08:00

13 lines
423 B
Python

from pyrogram import Client
from pyrogram.types import Message
from defs.weapons import get_weapon
async def weapon_msg(client: Client, message: Message):
name = message.text.replace('武器查询', '').replace('武器资料', '').strip()
text, url = await get_weapon(name)
if url:
await message.reply_photo(photo=url, caption=text, quote=True)
else:
await message.reply(text, quote=True)