summaryrefslogtreecommitdiff
path: root/ATRI/plugins/saucenao/__init__.py
diff options
context:
space:
mode:
authorKyomotoi <[email protected]>2022-07-22 19:46:19 +0800
committerKyomotoi <[email protected]>2022-07-22 19:46:19 +0800
commit8012b5ab7fb3d9a26976997df6dbb53c1e7f994c (patch)
treee96219fe42f2157e9981f51aa5499ad541dca4a0 /ATRI/plugins/saucenao/__init__.py
parent6b877d5e084f059c7769d1294c0e829ec34cb41b (diff)
downloadATRI-8012b5ab7fb3d9a26976997df6dbb53c1e7f994c.tar.gz
ATRI-8012b5ab7fb3d9a26976997df6dbb53c1e7f994c.tar.bz2
ATRI-8012b5ab7fb3d9a26976997df6dbb53c1e7f994c.zip
🎨 优化代码
Diffstat (limited to 'ATRI/plugins/saucenao/__init__.py')
-rw-r--r--ATRI/plugins/saucenao/__init__.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/ATRI/plugins/saucenao/__init__.py b/ATRI/plugins/saucenao/__init__.py
index 9b502bd..bf9e06b 100644
--- a/ATRI/plugins/saucenao/__init__.py
+++ b/ATRI/plugins/saucenao/__init__.py
@@ -20,9 +20,7 @@ async def _deal_search(event: MessageEvent):
# cache fix
if not sn.key:
- data = ServiceTools.load_service("以图搜图")
- data["enabled"] = False
- ServiceTools.save_service(data, "以图搜图")
+ ServiceTools.service_controller("以图搜图", False)
log.warning("插件 SauceNao 所需的 key 未配置,将被全局禁用,后续填写请手动启用")
user_id = event.get_user_id()