feat(onebot): configure group invite policy
Add validated group member invite policy updates with post-write verification. Fixes #334
This commit is contained in:
11 files changed
+343
-6
No files matched your search
@@ -65,6 +65,23 @@ export const actions = [
|
||||
},
|
||||
}),
|
||||
|
||||
groupAction({
|
||||
name: 'set_group_member_invite_policy',
|
||||
summary: '设置群成员邀请策略',
|
||||
params: {
|
||||
policy: f.enum(
|
||||
'disabled',
|
||||
'require_approval',
|
||||
'no_approval',
|
||||
'no_approval_under_100',
|
||||
),
|
||||
},
|
||||
run: async (p, ctx) => {
|
||||
await ctx.bridge.apis.groupAdmin.setMemberInvitePolicy(p.group_id, p.policy);
|
||||
return okResponse();
|
||||
},
|
||||
}),
|
||||
|
||||
groupUserAction({
|
||||
name: 'set_group_admin',
|
||||
summary: '设置/取消管理员',
|
||||
@@ -128,4 +145,3 @@ export const actions = [
|
||||
},
|
||||
}),
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user