summaryrefslogtreecommitdiff
path: root/ATRI/plugins/essential
diff options
context:
space:
mode:
authorRuoqi Yang <[email protected]>2022-11-12 18:56:50 +0800
committerRuoqi Yang <[email protected]>2022-11-12 19:19:12 +0800
commit8aba97ec5c4d9dd001e01427defd9bbd6bdb47cf (patch)
tree919e083c45f9dfd3c9e7771dc4bc3e69391d697a /ATRI/plugins/essential
parent9775416cff368dc8acbf2615f05bb86c7196b009 (diff)
downloadATRI-8aba97ec5c4d9dd001e01427defd9bbd6bdb47cf.tar.gz
ATRI-8aba97ec5c4d9dd001e01427defd9bbd6bdb47cf.tar.bz2
ATRI-8aba97ec5c4d9dd001e01427defd9bbd6bdb47cf.zip
fix: add friend request handling
Diffstat (limited to 'ATRI/plugins/essential')
-rw-r--r--ATRI/plugins/essential/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ATRI/plugins/essential/__init__.py b/ATRI/plugins/essential/__init__.py
index 4635583..020653e 100644
--- a/ATRI/plugins/essential/__init__.py
+++ b/ATRI/plugins/essential/__init__.py
@@ -45,7 +45,7 @@ friend_add_event = plugin.on_request("好友申请", "好友申请检测")
@friend_add_event.handle()
-async def _(event: FriendRequestEvent):
+async def _(bot: Bot, event: FriendRequestEvent):
path = __ESSENTIAL_DIR / "friend_add.json"
file = FileDealer(path)
if not path.is_file():
@@ -62,7 +62,7 @@ async def _(event: FriendRequestEvent):
user_id=user_id,
comment=apply_comment,
time=now_time,
- )
+ ).dict()
await file.write(json.dumps(data))
result = (