summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ATRI/plugins/LearnRepo.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ATRI/plugins/LearnRepo.py b/ATRI/plugins/LearnRepo.py
index c87f863..1d79836 100644
--- a/ATRI/plugins/LearnRepo.py
+++ b/ATRI/plugins/LearnRepo.py
@@ -49,7 +49,10 @@ async def _(session: CommandSession):
elif w_tpye == '删除词汇':
if word in data.keys():
- data.pop(word)
+ data.pop(f"{word}")
+ f = open(Path('.') / 'ATRI' / 'plugins' / 'LearnRepo' / 'LearnRepo.json', 'w')
+ f.write(json.dumps(data))
+ f.close()
await session.send(f'已成功从ATRI记忆模块中抹除[{word}]')
else: