diff options
author | Kyomotoi <[email protected]> | 2022-07-15 11:23:39 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2022-07-15 11:23:39 +0800 |
commit | a24d040bfa2e2c6340f31548059af7ccd144a15d (patch) | |
tree | 85e993b40476873cc9a074124e0436d8350c64dc /ATRI | |
parent | 4c2c53519c022ba15c7e9d0321be15e02943e497 (diff) | |
download | ATRI-a24d040bfa2e2c6340f31548059af7ccd144a15d.tar.gz ATRI-a24d040bfa2e2c6340f31548059af7ccd144a15d.tar.bz2 ATRI-a24d040bfa2e2c6340f31548059af7ccd144a15d.zip |
🐛 修复词库可能的bug
Diffstat (limited to 'ATRI')
-rw-r--r-- | ATRI/plugins/thesaurus/__init__.py | 4 | ||||
-rw-r--r-- | ATRI/plugins/thesaurus/listener.py | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/ATRI/plugins/thesaurus/__init__.py b/ATRI/plugins/thesaurus/__init__.py index 837cfaf..5e96bf2 100644 --- a/ATRI/plugins/thesaurus/__init__.py +++ b/ATRI/plugins/thesaurus/__init__.py @@ -326,9 +326,7 @@ async def _get_del_global_item_info(matcher: Matcher, args: Message = CommandArg @del_global_item.got("ts_del_global_item_id", "要删除词条的id是?") -async def _deal_del_global_item( - event: GroupMessageEvent, item_id: str = ArgPlainText("ts_del_global_item_id") -): +async def _deal_del_global_item(item_id: str = ArgPlainText("ts_del_global_item_id")): tm = ThesaurusManager() result = await tm.del_item(item_id, 0, True) diff --git a/ATRI/plugins/thesaurus/listener.py b/ATRI/plugins/thesaurus/listener.py index da3a0a6..a05965c 100644 --- a/ATRI/plugins/thesaurus/listener.py +++ b/ATRI/plugins/thesaurus/listener.py @@ -96,6 +96,9 @@ async def _tl_listener(event: MessageEvent): for item in query_result: item_info: ThesaurusStoragor = item + if not item_info.result: + continue + if item_info.m_type == 1: if item_info.matcher in msg: if item_info.need_at: |