From a804224ee290290b7d1ce9ae1abcda6bef1bb818 Mon Sep 17 00:00:00 2001 From: LZY <809234122@qq.com> Date: Sun, 16 Apr 2023 15:26:46 +0200 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8F=90=E7=A4=BA=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LittlePaimon/plugins/Paimon_Gacha_Log/__init__.py | 2 +- LittlePaimon/plugins/Paimon_Gacha_Log/data_source.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/LittlePaimon/plugins/Paimon_Gacha_Log/__init__.py b/LittlePaimon/plugins/Paimon_Gacha_Log/__init__.py index 6ba3593..2a5e5a2 100644 --- a/LittlePaimon/plugins/Paimon_Gacha_Log/__init__.py +++ b/LittlePaimon/plugins/Paimon_Gacha_Log/__init__.py @@ -108,7 +108,7 @@ async def _(event: MessageEvent, player=CommandPlayer(1)): await update_log.send(f'开始为UID{player[0].uid}更新抽卡记录,请稍候...') try: result = await get_gacha_log_data(player[0].user_id, player[0].uid) - await update_log.send(result or 'Stoken已失效,请重新绑定之后再更新', at_sender=True) + await update_log.send(result or 'Stoken已失效,请重新绑定或刷新cookie之后再更新', at_sender=True) except Exception as e: logger.info('原神抽卡记录', f'➤➤更新抽卡记录时出现错误:{e}') await update_log.send(f'更新抽卡记录时出现错误:{e}') diff --git a/LittlePaimon/plugins/Paimon_Gacha_Log/data_source.py b/LittlePaimon/plugins/Paimon_Gacha_Log/data_source.py index 994884c..77f135a 100644 --- a/LittlePaimon/plugins/Paimon_Gacha_Log/data_source.py +++ b/LittlePaimon/plugins/Paimon_Gacha_Log/data_source.py @@ -86,7 +86,7 @@ def gacha_log_to_UIGF(user_id: str, uid: str) -> Tuple[bool, str, Optional[Path] """ data, state = load_history_info(user_id, uid) if not state: - return False, f'UID{uid}还没有抽卡记录数据,请先更新', None + return False, f'UID{uid}还没有抽卡记录数据,可使用命令[更新抽卡记录]更新', None logger.info('原神抽卡记录', '➤', {'用户': user_id, 'UID': uid}, '导出抽卡记录', True) save_path = Path() / 'data' / 'LittlePaimon' / 'user_data' / 'gacha_log_data' / f'gacha_log_UIGF-{user_id}-{uid}.json' uigf_dict = { @@ -159,7 +159,7 @@ async def get_gacha_log_data(user_id: str, uid: str): logger.info('原神抽卡记录', '➤➤', {}, 'Stoken已失效,更新失败', False) cookie_info.stoken = None await cookie_info.save() - return f'UID{uid}的Stoken已失效,请重新绑定后再更新抽卡记录' + return f'UID{uid}的Stoken已失效,请重新绑定或刷新cookie后再更新抽卡记录' data = data['data']['list'] if not data: break @@ -198,7 +198,7 @@ async def get_gacha_log_img(user_id: str, uid: str, nickname: str): await LastQuery.update_last_query(user_id, uid) data, state = load_history_info(user_id, uid) if not state: - return f'UID{uid}还没有抽卡记录数据,请先更新' + return f'UID{uid}还没有抽卡记录数据,可使用命令[更新抽卡记录]更新' if player_info := await PlayerInfo.get_or_none(user_id=user_id, uid=uid): return await draw_gacha_log(player_info.user_id, player_info.uid, player_info.nickname, player_info.signature, data)