diff --git a/Paimon_Plugins/__init__.py b/Paimon_Plugins/__init__.py index 054c27e..79eb90f 100644 --- a/Paimon_Plugins/__init__.py +++ b/Paimon_Plugins/__init__.py @@ -103,12 +103,14 @@ async def addFriend(bot: Bot, event: FriendRequestEvent): superuser_msg = f'{event.user_id}请求添加派蒙为好友, 验证信息为:{event.comment}' if config.paimon_add_friend == 1: superuser_msg += ',已自动同意' - await event.approve() + await sleep(random.randint(2, 4)) + await event.approve(bot) await sleep(random.randint(3, 6)) await bot.send_private_msg(user_id=event.user_id, message=f'旅行者你好呀,这里是小派蒙,发送/help查看帮助哦') elif config.paimon_add_friend == 2: superuser_msg += ',已自动拒绝' - await event.reject() + await sleep(random.randint(2, 4)) + await event.reject(bot) else: superuser_msg += ',请主人自行处理哦' await bot.send_private_msg(user_id=superuser, message=superuser_msg) @@ -121,12 +123,14 @@ async def addFriend(bot: Bot, event: GroupRequestEvent): superuser_msg = f'{event.user_id}邀请派蒙加入群{event.group_id}' if config.paimon_add_group == 1 or event.user_id == superuser: superuser_msg += ',已自动同意' - await event.approve() + await sleep(random.randint(2, 4)) + await event.approve(bot) await sleep(random.randint(3, 6)) await bot.send_group_msg(group_id=event.group_id, message=f'旅行者们大家好呀,这里是小派蒙,发送/help查看帮助哦') elif config.paimon_add_group == 2: superuser_msg += ',已自动拒绝' - await event.reject() + await sleep(random.randint(2, 4)) + await event.reject(bot) else: superuser_msg += ',请主人自行处理哦' await bot.send_private_msg(user_id=superuser, message=superuser_msg)