mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2025-04-12 23:29:37 +08:00
🐛 修复原神语音列表无反应
This commit is contained in:
parent
6e59821943
commit
429ef67192
@ -231,8 +231,9 @@ def CommandCharacter(limit: int = 3, replace_uid: bool = True) -> List[str]:
|
|||||||
:return: 角色名列表
|
:return: 角色名列表
|
||||||
"""
|
"""
|
||||||
|
|
||||||
async def _character(matcher: Matcher, state: T_State, user_id: str = Arg('main_user')):
|
async def _character(matcher: Matcher, state: T_State, event: MessageEvent):
|
||||||
msg = state['_prefix']['command_arg'].extract_plain_text().strip() if replace_uid else state['msg']
|
msg = state['_prefix']['command_arg'].extract_plain_text().strip() if not replace_uid else state['msg']
|
||||||
|
user_id = state.get('main_user', str(event.user_id))
|
||||||
if not msg:
|
if not msg:
|
||||||
return [random.choice(CHARACTERS)]
|
return [random.choice(CHARACTERS)]
|
||||||
character_list = []
|
character_list = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user