feat(onebot): accept join question and answer on set_group_add_option

add_type 4 takes group_question and group_answer. add_type 5 (and 55)
takes group_question. get_group_admin_settings also returns both.

Fixes #383
This commit is contained in:
DrSmoothl committed 2026-08-17 19:12:43 +08:00
1 parent 3cb3024b39
commit cd6ada0caa
8 files changed
+148 -9

No files matched your search

+32
View File
@@ -3874,6 +3874,14 @@
"type": "integer",
"description": "加群选项(同 set_group_add_option.add_type)"
},
"group_question": {
"type": "string",
"description": "加群问题(同 set_group_add_option.group_question)"
},
"group_answer": {
"type": "string",
"description": "加群答案(同 set_group_add_option.group_answer)"
},
"robot_member_switch": {
"type": "integer",
"description": "机器人加群开关(同 set_group_robot_add_option)"
@@ -3919,6 +3927,8 @@
},
"required": [
"add_type",
"group_question",
"group_answer",
"robot_member_switch",
"robot_member_examine",
"member_invite_policy",
@@ -9617,6 +9627,22 @@
"minimum": 0
},
"default": 0
},
{
"name": "group_question",
"type": "string",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "group_answer",
"type": "string",
"required": false,
"schema": {
"type": "string"
}
}
],
"invariants": [],
@@ -9633,6 +9659,12 @@
"type": "integer",
"minimum": 0,
"default": 0
},
"group_question": {
"type": "string"
},
"group_answer": {
"type": "string"
}
},
"required": [
+32
View File
@@ -3877,6 +3877,14 @@ export const ACTIONS: CatalogAction[] = [
"type": "integer",
"description": "加群选项(同 set_group_add_option.add_type)"
},
"group_question": {
"type": "string",
"description": "加群问题(同 set_group_add_option.group_question)"
},
"group_answer": {
"type": "string",
"description": "加群答案(同 set_group_add_option.group_answer)"
},
"robot_member_switch": {
"type": "integer",
"description": "机器人加群开关(同 set_group_robot_add_option)"
@@ -3922,6 +3930,8 @@ export const ACTIONS: CatalogAction[] = [
},
"required": [
"add_type",
"group_question",
"group_answer",
"robot_member_switch",
"robot_member_examine",
"member_invite_policy",
@@ -9620,6 +9630,22 @@ export const ACTIONS: CatalogAction[] = [
"minimum": 0
},
"default": 0
},
{
"name": "group_question",
"type": "string",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "group_answer",
"type": "string",
"required": false,
"schema": {
"type": "string"
}
}
],
"invariants": [],
@@ -9636,6 +9662,12 @@ export const ACTIONS: CatalogAction[] = [
"type": "integer",
"minimum": 0,
"default": 0
},
"group_question": {
"type": "string"
},
"group_answer": {
"type": "string"
}
},
"required": [