summaryrefslogtreecommitdiff
path: root/ATRI/plugins/wife/data_source.py
diff options
context:
space:
mode:
authorKyomotoi <[email protected]>2022-06-09 22:32:12 +0800
committerKyomotoi <[email protected]>2022-06-09 22:32:12 +0800
commit88a4105e7cbfbcd7952b3d47be3279f021f7ad6f (patch)
tree4ea6c61f0c058ae6eef57678ed3717d7d4ffe6bf /ATRI/plugins/wife/data_source.py
parenta8163fc8b97612793d3b55ebd4e90c61cd4ba77a (diff)
downloadATRI-88a4105e7cbfbcd7952b3d47be3279f021f7ad6f.tar.gz
ATRI-88a4105e7cbfbcd7952b3d47be3279f021f7ad6f.tar.bz2
ATRI-88a4105e7cbfbcd7952b3d47be3279f021f7ad6f.zip
💩 优化代码
Diffstat (limited to 'ATRI/plugins/wife/data_source.py')
-rw-r--r--ATRI/plugins/wife/data_source.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/ATRI/plugins/wife/data_source.py b/ATRI/plugins/wife/data_source.py
index 9ba1e93..7074f93 100644
--- a/ATRI/plugins/wife/data_source.py
+++ b/ATRI/plugins/wife/data_source.py
@@ -1,4 +1,3 @@
-import os
import json
from random import choice
from pathlib import Path
@@ -9,7 +8,7 @@ from ATRI.rule import is_in_service
WIFE_DIR = Path(".") / "data" / "database" / "wife"
-os.makedirs(WIFE_DIR, exist_ok=True)
+WIFE_DIR.mkdir(parents=True, exist_ok=True)
class Wife(Service):
@@ -38,7 +37,7 @@ class Wife(Service):
),
]
)
- result = MessageSegment.at(user_id) + content
+ result = MessageSegment.at(user_id) + content # type: ignore
return result
@staticmethod