get_recent_notices_and_requests
Retrieve recent group notices and friend/group join requests from local WebSocket cache. Use returned flags to approve requests or monitor group activity.
Instructions
从本地 WebSocket 环形缓存池中读取近期实时捕获的群通知事件(群文件上传、消息撤回、禁言、成员变动)及加好友/加群验证请求。
适用场景:监听群动态或获取验证请求的 flag 标识以便通过 call_napcat_api 调用 set_friend_add_request / set_group_add_request 审批。不适用与替代:若需读取普通私聊或群聊文字/富媒体消息,请改用 get_recent_messages。
行为与返回:纯本地内存只读操作;返回 ws_connected、notices 数组与 requests 数组。
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_recent_notices_and_requests"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | 通知与请求各自返回的最大条数(范围 1~200,默认 20) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | 接口返回的业务负载数据(对象或数组,具体字段依工具而定) | |
| status | No | 执行状态标识,成功为 'ok'(或特定生命周期状态),失败为 'failed' 或 'error' | |
| message | No | 状态说明或错误诊断详情 | |
| retcode | No | OneBot 11 响应状态码,0 表示成功,非 0 表示协议端或网络错误 |