diff --git a/README.md b/README.md index 30d2f469..a330c641 100644 --- a/README.md +++ b/README.md @@ -280,6 +280,7 @@ PS: **ARM平台** 请使用全量版 同时 **如果你的机器 RAM < 1G 可能 ### 2022/8/26 * 修复群管理员无法添加词条 +* 修复词条关键词"问"前空格问题 ### 2022/8/23 diff --git a/plugins/word_bank/word_handle.py b/plugins/word_bank/word_handle.py index 401562c7..5d6158ed 100644 --- a/plugins/word_bank/word_handle.py +++ b/plugins/word_bank/word_handle.py @@ -130,8 +130,9 @@ async def _( problem = temp break problem = unescape(problem) - index = len((word_scope or "") + "添加词条" + (word_type or "") + problem) + 1 - event.message[0] = event.message[0].data["text"][index + 1 :].strip() + # index = len((word_scope or "") + "添加词条" + (word_type or "") + problem) + 1 + # event.message[0] = event.message[0].data["text"][index + 1 :].strip() + event.message[0] = event.message[0].data["text"].split('答', maxsplit=1)[-1].strip() state["word_scope"] = word_scope state["word_type"] = word_type state["problem"] = problem