diff options
| author | Kyomotoi <1172294279@qq.com> | 2020-11-28 21:47:58 +0800 | 
|---|---|---|
| committer | Kyomotoi <1172294279@qq.com> | 2020-11-28 21:47:58 +0800 | 
| commit | db437589398c5d6d8925681a81bac387746b1ede (patch) | |
| tree | 6452243891817cd26760fddabebbbff860a2c2d1 /ATRI/utils | |
| parent | 53e7fadaee1541cfdb60dde943a12f4070e6f75d (diff) | |
| download | ATRI-db437589398c5d6d8925681a81bac387746b1ede.tar.gz ATRI-db437589398c5d6d8925681a81bac387746b1ede.tar.bz2 ATRI-db437589398c5d6d8925681a81bac387746b1ede.zip | |
[Upload]
Diffstat (limited to 'ATRI/utils')
| -rw-r--r-- | ATRI/utils/utils_ban/__init__.py | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/ATRI/utils/utils_ban/__init__.py b/ATRI/utils/utils_ban/__init__.py index 1946c5c..5cd361e 100644 --- a/ATRI/utils/utils_ban/__init__.py +++ b/ATRI/utils/utils_ban/__init__.py @@ -23,3 +23,8 @@ def ban(user: str) -> None:      data[user] = user      with open(BAN_LIST_PATH, 'w') as f:          f.write(json.dumps(data)) + +def unban(user: str) -> None: +    del data[user] +    with open(BAN_LIST_PATH, 'w') as f: +        f.write(json.dumps(data)) | 
