mirror of
https://github.com/TriM-Organization/LiteyukiBot-TriM.git
synced 2024-11-15 11:54:40 +08:00
小bug快快修
This commit is contained in:
parent
a80df00960
commit
f2467b9377
@ -297,11 +297,15 @@ async def _(
|
|||||||
|
|
||||||
file_2_write = (cmd_arg[1] + ".txt") if len(cmd_arg) > 1 else "新建文本文档.txt"
|
file_2_write = (cmd_arg[1] + ".txt") if len(cmd_arg) > 1 else "新建文本文档.txt"
|
||||||
|
|
||||||
file_path = get_stored_path(usr_id, file_2_write, superuser=False)
|
(file_path := get_stored_path(usr_id, file_2_write, superuser=False)).parent.mkdir(
|
||||||
|
parents=True, exist_ok=True
|
||||||
|
)
|
||||||
|
|
||||||
if "-a" in whole_texts[0]:
|
if "-a" in whole_texts[0]:
|
||||||
if file_2_write in filesaves[usr_id].keys():
|
if file_2_write in filesaves[usr_id].keys():
|
||||||
await write_file(file_path,content=whole_texts[1], mode="a", encoding="utf-8")
|
await write_file(
|
||||||
|
file_path, content=whole_texts[1], mode="a", encoding="utf-8"
|
||||||
|
)
|
||||||
file_size = os.path.getsize(file_path)
|
file_size = os.path.getsize(file_path)
|
||||||
filesaves[usr_id]["totalSize"] += (
|
filesaves[usr_id]["totalSize"] += (
|
||||||
file_size - filesaves[usr_id][file_2_write]["size"]
|
file_size - filesaves[usr_id][file_2_write]["size"]
|
||||||
|
Loading…
Reference in New Issue
Block a user