From 8ffbf0d01491a328e786bf20cfc63f1f8a14c4df Mon Sep 17 00:00:00 2001 From: CMHopeSunshine <277073121@qq.com> Date: Mon, 12 Jun 2023 22:25:05 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E6=98=9F=E9=93=81=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E6=94=AF=E6=8C=81@?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LittlePaimon/plugins/star_rail_info/__init__.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/LittlePaimon/plugins/star_rail_info/__init__.py b/LittlePaimon/plugins/star_rail_info/__init__.py index 7236971..9389940 100644 --- a/LittlePaimon/plugins/star_rail_info/__init__.py +++ b/LittlePaimon/plugins/star_rail_info/__init__.py @@ -43,15 +43,19 @@ bind_cmd = on_command("星铁绑定", aliases={"崩铁绑定", "星穹铁道绑 @panel_cmd.handle() async def panel_cmd_handler(event: MessageEvent, args: Message = CommandArg()): + if (at_msg := args['at']) and 'qq' in at_msg[0].data: + user_id = str(at_msg[0].data['qq']) + else: + user_id = str(event.user_id) name = args.extract_plain_text().strip() if not name: - await panel_cmd.finish("请给出要查询的角色名全称") - uid = get_uid(str(event.user_id)) + await panel_cmd.finish("请给出要查询的角色名全称~") + uid = get_uid(user_id) if not uid: await panel_cmd.finish("请先使用命令[星铁绑定 uid]来绑定星穹铁道UID") data = get_info(uid, name) if not data: - await panel_cmd.finish("你还没有该角色的面板数据哦,请将该角色放在你的游戏主页中,使用命令[更新星铁面板]来更新") + await panel_cmd.finish("还没有该角色的面板数据哦,请将该角色放在游戏支援角色或星海同行中,使用命令[更新星铁面板]来更新") try: image = await draw_character(data, uid) except Exception as e: