summaryrefslogtreecommitdiff
path: root/ATRI
diff options
context:
space:
mode:
Diffstat (limited to 'ATRI')
-rw-r--r--ATRI/plugins/thesaurus/__init__.py4
-rw-r--r--ATRI/plugins/thesaurus/listener.py3
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: