diff options
author | Kyomotoi <[email protected]> | 2020-08-28 21:29:57 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2020-08-28 21:29:57 +0800 |
commit | 3416dc3d29ad6b8def93a700dcf3c93d632eceaf (patch) | |
tree | ccefd4790280b2583e3390bfa4235ce15765d823 /ATRI/plugins | |
parent | 20f94639d16df178d0018fb771f8f3238c1ed49c (diff) | |
download | ATRI-3416dc3d29ad6b8def93a700dcf3c93d632eceaf.tar.gz ATRI-3416dc3d29ad6b8def93a700dcf3c93d632eceaf.tar.bz2 ATRI-3416dc3d29ad6b8def93a700dcf3c93d632eceaf.zip |
Update LearnRepo.py
Diffstat (limited to 'ATRI/plugins')
-rw-r--r-- | ATRI/plugins/LearnRepo.py | 5 |
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: |