🐛 fix bug

This commit is contained in:
CMHopeSunshine 2022-08-17 16:29:51 +08:00
parent 2711e8f81d
commit 6cd5bce0b1

View File

@ -361,7 +361,7 @@ async def _(event: MessageEvent, state: T_State):
name = replace_all(name.extract_plain_text().strip().replace('ysc', ''), state['uid']) name = replace_all(name.extract_plain_text().strip().replace('ysc', ''), state['uid'])
if name == 'q': if name == 'q':
await ysc.finish() await ysc.finish()
match_alias = get_match_alias(name, 'roles', True) match_alias = get_match_alias(name, '角色', True)
if len(match_alias) == 1: if len(match_alias) == 1:
state['choice'] = match_alias state['choice'] = match_alias
else: else:
@ -610,7 +610,7 @@ async def _(event: MessageEvent, state: T_State, msg: Message = CommandArg()):
if msg.startswith(('a', '全部', '所有', '查看')): if msg.startswith(('a', '全部', '所有', '查看')):
state['role'] = 'all' state['role'] = 'all'
else: else:
match_alias = get_match_alias(msg, 'roles', True) match_alias = get_match_alias(msg, '角色', True)
if match_alias: if match_alias:
state['role'] = match_alias if isinstance(match_alias, str) else tuple(match_alias.keys())[0] state['role'] = match_alias if isinstance(match_alias, str) else tuple(match_alias.keys())[0]
else: else: