Enka_Genshin_bot/plugins/start.py
2022-06-04 13:53:53 +08:00

27 lines
1.1 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from pyrogram import filters, Client
from pyrogram.types import Message
from ci import app, me
des = """
你好!{} 我是 [{}]({})
> 请先使用 `/bind [uid]` 绑定游戏 uid 进行更新数据,然后使用 `/search [uid可选]` 获取角色卡片。
我基于公共 API 提供的数据来合成图片,支持以下数据:
`
- 等级、天赋、武器、面板数据、圣遗物
`
角色总分:`圣遗物总分 + 角色等级 + (a+e+q)*4 + 武器等级 * 1+(武器精炼数 -1 * 0.25`
角色数据基于 [enka](https://enka.shinshin.moe)
图片模板基于 [GenshinUID](https://github.com/KimigaiiWuyi/GenshinUID)
"""
@app.on_message(filters.command(["start", f"start@{me['result']['username']}"]) & filters.private)
async def start_command(_: Client, message: Message):
await message.reply(des.format(message.from_user.mention(),
me["result"]["first_name"],
f"https://t.me/{me['result']['username']}"),
disable_web_page_preview=True,
quote=True)