From 89f6b15d1f4c7f903ec89457a86e847fe45edaf6 Mon Sep 17 00:00:00 2001 From: CMHopeSunshine <277073121@qq.com> Date: Thu, 22 Dec 2022 23:26:31 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E6=96=B0=E5=A2=9E`=E5=8E=9F?= =?UTF-8?q?=E7=A5=9E=E6=89=AB=E7=A0=81=E7=BB=91=E5=AE=9A`=E7=BB=91?= =?UTF-8?q?=E5=AE=9ACK=EF=BC=8C=E9=9C=80=E8=A6=81=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E4=BE=9D=E8=B5=96`poetry=20install`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LittlePaimon/plugins/Paimon_Bind/get_cookie.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/LittlePaimon/plugins/Paimon_Bind/get_cookie.py b/LittlePaimon/plugins/Paimon_Bind/get_cookie.py index fa336e3..cfc672d 100644 --- a/LittlePaimon/plugins/Paimon_Bind/get_cookie.py +++ b/LittlePaimon/plugins/Paimon_Bind/get_cookie.py @@ -1,5 +1,6 @@ # main code from lulu: https://github.com/lulu666lulu import asyncio +import contextlib import datetime import json import random @@ -22,8 +23,8 @@ from LittlePaimon.utils.api import get_bind_game_info from LittlePaimon.utils.message import fullmatch_rule CN_DS_SALT = 'JwYDpKvLj6MrMqqYU6jTKF17KNO2PXoS' -bind_tips = '绑定方法二选一:\n1.通过米游社扫码绑定:\n请发送指令[原神扫码绑定 uid]\n2.通过Cookie绑定:获取教程\ndocs.qq.com/doc/DQ3JLWk1vQVllZ2Z1\n获取后,使用[ysb cookie]指令绑定' -bind_tips_web = '绑定方法二选一:\n1.通过米游社扫码绑定:\n请发送指令[原神扫码绑定 uid]\n2.通过Cookie绑定:获取教程\ndocs.qq.com/doc/DQ3JLWk1vQVllZ2Z1\n获取后,使用[ysb cookie]指令绑定或前往{cookie_web_url}网页添加绑定' +bind_tips = '绑定方法二选一:\n1.通过米游社扫码绑定:\n请发送指令[原神扫码绑定]\n2.通过Cookie绑定:获取教程\ndocs.qq.com/doc/DQ3JLWk1vQVllZ2Z1\n获取后,使用[ysb cookie]指令绑定' +bind_tips_web = '绑定方法二选一:\n1.通过米游社扫码绑定:\n请发送指令[原神扫码绑定]\n2.通过Cookie绑定:获取教程\ndocs.qq.com/doc/DQ3JLWk1vQVllZ2Z1\n获取后,使用[ysb cookie]指令绑定或前往{cookie_web_url}网页添加绑定' running_login_data = {} @@ -139,7 +140,7 @@ async def _(event: MessageEvent): # sourcery skip: use-fstring-for-concatenatio @scheduler.scheduled_job('cron', second='*/10', misfire_grace_time=10) async def check_qrcode(): - try: + with contextlib.suppress(RuntimeError): for user_id, data in running_login_data.items(): send_msg = None status_data = await check_login(data) @@ -189,5 +190,3 @@ async def check_qrcode(): if not running_login_data: break await asyncio.sleep(1) - except RuntimeError: - pass