OpenShamrock/docs/api/dispose.md
2023-11-21 23:43:56 +08:00

50 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: 处理相关
icon: bowling-ball
---
::: warning 注意
对于 Shamrock 尚未实现的 API会在标题添加标记 <Badge text="未实现" type="danger" vertical="baseline" />
:::
## 处理加好友请求
该接口用于处理加好友请求。
### API 端点
`/set_friend_add_request`
### 参数
| 字段名 | 数据类型 | 默认值 | 说明 |
| ------- | -------- | ------ | ----------------------------------------- |
| flag | string | - | 加好友请求的 flag需从上报的数据中获得 |
| approve | boolean | `true` | 是否同意请求 |
| remark | string | 空 | 添加后的好友备注(仅在同意时有效) |
### 响应
该接口将返回处理结果,其中 `data` 字段无数据。
## 处理加群请求/邀请
该接口用于处理加群请求/邀请。
### API 端点
`/set_group_add_request`
### 参数
| 字段名 | 数据类型 | 默认值 | 说明 |
| ---------------- | -------- | ------ | --------------------------------------------------------------------- |
| flag | string | - | 加群请求的 flag需从上报的数据中获得 |
| sub_type 或 type | string | - | `add``invite`, 请求类型(需要和上报消息中的 `sub_type` 字段相符) |
| approve | boolean | `true` | 是否同意请求/邀请 |
| reason | string | 空 | 拒绝理由(仅在拒绝时有效) |
### 响应
该接口将返回处理结果,其中 `data` 字段无数据。