优化部分提示

This commit is contained in:
CMHopeSunshine 2022-12-24 10:24:34 +08:00
parent 6999d71f18
commit 268670e61a
3 changed files with 11 additions and 17 deletions

View File

@ -15,8 +15,7 @@
"神里绫人",
"妮露",
"莱依拉",
"艾尔海森",
"旅行者"
"艾尔海森"
],
"法器": [
"丽莎",
@ -98,8 +97,7 @@
"早柚",
"鹿野院平藏",
"流浪者",
"珐露珊",
"旅行者"
"珐露珊"
],
"雷": [
"丽莎",
@ -112,8 +110,7 @@
"八重神子",
"久岐忍",
"多莉",
"赛诺",
"旅行者"
"赛诺"
],
"水": [
"芭芭拉",
@ -145,16 +142,14 @@
"阿贝多",
"五郎",
"荒泷一斗",
"云堇",
"旅行者"
"云堇"
],
"草": [
"柯莱",
"提纳里",
"纳西妲",
"瑶瑶",
"艾尔海森",
"旅行者"
"艾尔海森"
]
}
},

View File

@ -114,8 +114,9 @@ async def _(event: MessageEvent, msg: Message = CommandArg()):
if not game_info['list']:
await ysb.finish('该账号尚未绑定任何游戏,请确认账号无误~', at_sender=True)
if not (
genshin_games := [{'uid': game['game_role_id'], 'nickname': game['nickname']} for game in game_info['list']
if game['game_id'] == 2]):
genshin_games := [{'uid': game['game_role_id'], 'nickname': game['nickname']} for game in
game_info['list']
if game['game_id'] == 2]):
await ysb.finish('该账号尚未绑定原神,请确认账号无误~', at_sender=True)
await LastQuery.update_or_create(user_id=str(event.user_id),
defaults={'uid': genshin_games[0]['uid'],
@ -136,11 +137,9 @@ async def _(event: MessageEvent, msg: Message = CommandArg()):
'Cookie无效请确认是否已过期\n获取cookie的教程\ndocs.qq.com/doc/DQ3JLWk1vQVllZ2Z1',
at_sender=True)
elif config.CookieWeb_enable:
await ysb.finish(
bind_tips.format(cookie_web_url=config.CookieWeb_url), at_sender=True)
await ysb.finish(bind_tips_web.format(cookie_web_url=config.CookieWeb_url), at_sender=True)
else:
await ysb.finish('获取cookie的教程\ndocs.qq.com/doc/DQ3JLWk1vQVllZ2Z1\n获取后,使用[ysb cookie]指令绑定',
at_sender=True)
await ysb.finish(bind_tips, at_sender=True)
@ysbc.handle()

View File

@ -320,7 +320,7 @@ async def _(bot: Bot, event: MessageEvent, state: T_State, type: str = Arg('type
for v in value:
temp_msg += f'{index}.{v}\n'
index += 1
msg.append({'type': 'node', 'data': {'name': NICKNAME, 'uin': event.self_id, 'content': temp_msg}})
msg.append({'type': 'node', 'data': {'name': NICKNAME, 'uin': event.self_id, 'content': temp_msg.strip()}})
msg.insert(0, {'type': 'node',
'data': {'name': NICKNAME, 'uin': event.self_id, 'content': f'你要查询哪个的{type}呢?'}})
msg.append({'type': 'node', 'data': {'name': NICKNAME, 'uin': event.self_id,