Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

改善login登录交互流程 #63

Merged
merged 3 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion nonebot_plugin_splatoon3_nso/handle/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def login_in(bot: Bot, event: Event, matcher: Matcher):
# 发送md
await bot_send_login_md(bot, event, user_id)
else:
msg = "QQ平台当前无法完成nso登录流程,请至其他平台完成登录后获取绑定码\n" \
msg = "QQ平台当前无法完成nso登录流程,请至其他平台完成登录后使用/get_login_code命令获取绑定码\n" \
f"Kook服务器id:{plugin_config.splatoon3_kk_guild_id}"
await bot_send(bot, event, msg)

Expand Down Expand Up @@ -111,6 +111,8 @@ async def login_in_2(bot: Bot, event: Event):
err_msg = "登录失败,请 /login 重试, 并在浏览器打开bot新发给你的登录链接,在重新完成登录后,复制按钮的新链接给我,链接是一串npf开头的文本"
if (not text) or (len(text) < 500) or (not text.startswith('npf')) or (auth_code_verifier is None):
logger.info(err_msg)
# 登录失败直接销毁用户等待字典
global_login_status_dict.pop(msg_id)
await bot.send(event, message=err_msg)
return

Expand Down
2 changes: 1 addition & 1 deletion nonebot_plugin_splatoon3_nso/handle/qq_md.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def login_md(user_id, check_session=False) -> QQ_Msg:
data1 = ""
if check_session:
data1 += "nso未登录,无法使用相关查询,"
data1 += "QQ平台当前无法完成登录流程,请至其他平台完成登录后获取绑定码"
data1 += "QQ平台当前无法完成登录流程,请至其他平台完成登录后使用/get_login_code命令获取绑定码"
data2 = f"Kook服务器id:{plugin_config.splatoon3_kk_guild_id}"
button_show = "kook服务器"
kook_jump_link = "https://www.kookapp.cn/app/invite/mkjIOn"
Expand Down
2 changes: 1 addition & 1 deletion nonebot_plugin_splatoon3_nso/handle/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async def _check_session_handler(bot: Bot, event: Event, matcher: Matcher):
await matcher.finish()
else:
msg = "nso未登录,无法使用相关查询\n" \
"QQ平台当前无法完成nso登录流程,请至其他平台完成登录后获取绑定码\n" \
"QQ平台当前无法完成nso登录流程,请至其他平台完成登录后使用/get_login_code命令获取绑定码\n" \
f"Kook服务器id:{plugin_config.splatoon3_kk_guild_id}"
elif isinstance(bot, All_BOT):
msg = "nso未登录,无法使用相关查询,请先私信我 /login 进行登录"
Expand Down
2 changes: 1 addition & 1 deletion nonebot_plugin_splatoon3_nso/utils/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

BOT_VERSION = "2.6.0"
BOT_VERSION = "2.6.1"
DIR_RESOURCE = f"{os.path.abspath(os.path.join(__file__, os.pardir, os.pardir))}/resource"
plugin_release_time = "2024-01-30 02:35:58" # 预留 2.0.0重构版nso插件发布时间,预计发布时对全部用户先显示一周,之后再判断用户创建时间

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nonebot-plugin-splatoon3-nso"
version = "1.4.0"
version = "1.4.1"
description = "一个基于nonebot2框架的splatoon3游戏nso数据查询插件"
authors = ["cypas <[email protected]>"]
readme = "README.md"
Expand Down