#
AiAddReqData
Parameter | Required | Type | Description |
---|---|---|---|
room_id | Yes | string | Room ID |
ai_players | Yes | aiPlayer array | AI player information |
is_ready | Yes | int | Whether to automatically prepare after the robot joins 1: Auto prepare 0: Not auto prepare Default is 1 |
aiPlayer
Parameter | Required | Type | Description |
---|---|---|---|
uid | Yes | string | uid |
avatar | Yes | string | Avatar url |
name | Yes | string | Name |
gender | Yes | string | Gender male: male female: female |
ai_level | Yes | int | Specifies the level of AI to be added. 0: Easy AI 1: Easy AI 2: Intermediate AI 3: Advanced AI Default value is 0. |
Request Example
{
"event": "ai_add",
"mg_id": "mg_id_1",
"timestamp": "1657770493152",
"data": {
"room_id": "roomId_1",
"ai_players": [{
"uid":"uid_1",
"avatar":"avatar_1",
"name":"name_1",
"gender":"male",
"ai_level":1
}],
"is_ready": 1
}
}
AiAddRespData
Parameter | Required | Type | Description |
---|---|---|---|
uids | Yes | string array | List of successfully added uids |
Response Example
{
"ret_code": 0,
"ret_msg": "",
"data": {
"uids": ["uid_1","uid_2"]
}
}