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

19 lines
636 B
Python

from pyrogram import Client
from pyrogram.types import Message
from defs.character import get_character, get_mz
async def character_msg(client: Client, message: Message):
name = message.text.replace('角色资料', '').replace('角色简介', '').replace('角色查询', '').strip()
text, url = get_character(name)
if url:
await message.reply_photo(photo=url, caption=text, quote=True)
else:
await message.reply(text, quote=True)
async def mz_msg(client: Client, message: Message):
name = message.text.replace('命座', '')
text = await get_mz(name)
await message.reply(text, quote=True)