diff --git a/README.md b/README.md index 766a4359..30d2f469 100644 --- a/README.md +++ b/README.md @@ -277,6 +277,10 @@ PS: **ARM平台** 请使用全量版 同时 **如果你的机器 RAM < 1G 可能 ## 更新 +### 2022/8/26 + +* 修复群管理员无法添加词条 + ### 2022/8/23 * 修了下模糊匹配 issue#1026 [@pull/1026](https://github.com/HibiKier/zhenxun_bot/pull/1026) diff --git a/plugins/word_bank/word_handle.py b/plugins/word_bank/word_handle.py index 8aa44b54..401562c7 100644 --- a/plugins/word_bank/word_handle.py +++ b/plugins/word_bank/word_handle.py @@ -93,7 +93,7 @@ async def _( state: T_State, reg_group: Tuple[Any, ...] = RegexGroup(), ): - if str(event.user_id) not in bot.config.superusers: + if isinstance(event, PrivateMessageEvent) and str(event.user_id) not in bot.config.superusers: await add_word.finish('权限不足捏') word_scope, word_type, problem, answer = reg_group if (