Skip to content

Commit bb19dfd

Browse files
committed
Update instruction.md
1 parent 1042758 commit bb19dfd

1 file changed

Lines changed: 62 additions & 0 deletions

File tree

src/api/v1/instruction.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,65 @@ POST v1/instruction/edit
166166
"msg": "success" // 返回消息
167167
}
168168
```
169+
170+
171+
# 获取机器人私聊指令
172+
173+
POST /v1/instruction/list
174+
175+
请求头:
176+
177+
|名称|必须|备注|
178+
|-----|-----|-----|
179+
|token|||
180+
181+
请求体:
182+
183+
```protobuf
184+
id: "123123123"
185+
```
186+
187+
```proto
188+
message get_bot_instruction {
189+
string id = 3;
190+
}
191+
```
192+
193+
响应体:
194+
195+
```protobuf
196+
status {
197+
number: 123456
198+
code: 1 // 请求状态码,1为正常
199+
msg: "success" // 返回消息
200+
}
201+
data {
202+
command_id: 123 // 指令id
203+
bot_id: 123123123 // 机器人id
204+
command_name: "测试指令名称" // 指令名称
205+
instruction_type: 5 // 指令类型,1-普通指令,2-直发指令,5-自定义输入指令
206+
command_defaultText: "测试默认输入文本" // 指令输入框默认文本
207+
command_settingsJso: "{}" // 指令设置JSON(表单指令,自定义输入指令)
208+
}
209+
```
210+
211+
```proto
212+
message Status {
213+
uint64 number = 1; // 不知道干啥的,可能是请求ID
214+
uint64 code = 2; // 状态码,1为正常
215+
string msg = 3; // 返回消息
216+
}
217+
218+
message instruction_list {
219+
Status status = 1;
220+
Data data = 2;
221+
message Data {
222+
uint64 command_id = 1; // 指令id
223+
string bot_id = 2; // 机器人id
224+
string command_name = 3; // 指令名称
225+
uint64 instruction_type = 5; // 指令类型,1-普通指令,2-直发指令,5-自定义输入指令
226+
string command_defaultText = 7; // 指令输入框默认文本
227+
string command_settingsJson = 10; // 指令设置JSON(表单指令,自定义输入指令)
228+
}
229+
}
230+
```

0 commit comments

Comments
 (0)