From 3416dc3d29ad6b8def93a700dcf3c93d632eceaf Mon Sep 17 00:00:00 2001 From: Kyomotoi <1172294279@qq.com> Date: Fri, 28 Aug 2020 21:29:57 +0800 Subject: Update LearnRepo.py --- ATRI/plugins/LearnRepo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ATRI/plugins') 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: -- cgit v1.2.3