From c905eb776d0e6b8c8930faf857ab07f070bdfb49 Mon Sep 17 00:00:00 2001 From: Kyomotoi <0w0@imki.moe> Date: Thu, 6 Apr 2023 16:56:10 +0800 Subject: =?UTF-8?q?=F0=9F=8E=A8=20=E4=BC=98=E5=8C=96=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E7=B1=BB=E6=96=87=E4=BB=B6=E6=93=8D=E4=BD=9C=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ATRI/plugins/essential/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ATRI/plugins/essential') diff --git a/ATRI/plugins/essential/__init__.py b/ATRI/plugins/essential/__init__.py index c16e101..883c191 100644 --- a/ATRI/plugins/essential/__init__.py +++ b/ATRI/plugins/essential/__init__.py @@ -49,7 +49,7 @@ async def _(event: FriendRequestEvent): path = __ESSENTIAL_DIR / "friend_add.json" file = FileDealer(path) if not path.is_file(): - await file.write(dict()) + await file.write_json(dict()) data = dict() apply_code = event.flag @@ -63,7 +63,7 @@ async def _(event: FriendRequestEvent): comment=apply_comment, time=now_time, ).dict() - await file.write(json.dumps(data)) + await file.write_json(data) result = ( MessageBuilder("咱收到一条好友请求!") @@ -83,7 +83,7 @@ async def _(event: GroupRequestEvent): path = __ESSENTIAL_DIR / "group_invite.json" file = FileDealer(path) if not path.is_file(): - await file.write(dict()) + await file.write_json(dict()) data = dict() apply_code = event.flag @@ -97,7 +97,7 @@ async def _(event: GroupRequestEvent): comment=apply_comment, time=now_time, ).dict() - await file.write(json.dumps(data)) + await file.write_json(data) result = ( MessageBuilder("咱收到一条应邀入群请求!") -- cgit v1.2.3