Skip to content

请求接口兼容情况

NapCatQQ 实现了 OneBot 11 以及 go-cqhttp 的大部分 API,对于 API 的详细说明请自行点击相关链接查看。

连接方式

连接方式可用
HTTP 接口调用
HTTP POST 事件上报
HTTP POST 快速操作
正向 WS 连接
反向 WS 连接

OneBot 11 API

Api介绍可用备注
send_private_msg发送私聊消息不支持主动临时消息
send_group_msg发送群消息
send_msg发送消息
delete_msg撤回消息
get_msg获取消息
get_forward_msg获取合并转发消息
send_like发送好友赞
set_group_kick群组踢人
set_group_ban群组单人禁言
set_group_anonymous_ban群组匿名用户禁言官方都没这功能了哦~
set_group_whole_ban群组全员禁言
set_group_admin群组设置管理员
set_group_anonymous群组匿名官方都没这功能了哦~
set_group_card设置群名片(群备注)
set_group_name设置群名
set_group_leave退出群组
set_group_special_title设置群组专属头衔QQNT还没更新这个功能
set_friend_add_request处理加好友请求
set_group_add_request处理加群请求/邀请
get_login_info获取登录号信息
get_stranger_info获取陌生人信息
get_friend_list获取好友列表
get_group_info获取群信息
get_group_list获取群列表
get_group_member_info获取群成员信息
get_group_member_list获取群成员列表
get_group_honor_info获取群荣誉信息
get_cookies获取 Cookies
get_csrf_token获取 CSRF Token
get_credentials获取 QQ 相关接口凭证
get_record获取语音
get_image获取图片
can_send_image检查是否可以发送图片
can_send_record检查是否可以发送语音
get_status获取运行状态
get_version_info获取版本信息
set_restart重启 OneBot 实现
clean_cache清理缓存

go-cqhttp API

Api介绍可用备注
set_qq_profile设置登录号资料使用 set_self_profile 代替
qidian_get_account_info获取企点账号信息不支持企点哦~
_get_model_show获取在线机型
_set_model_show设置在线机型QQNT还没更新这个功能
get_online_clients获取当前账号在线客户端列表
get_unidirectional_friend_list获取单向好友列表QQNT还没更新这个功能
delete_friend删除好友
delete_unidirectional_friend删除单向好友QQNT还没更新这个功能
mark_msg_as_read标记消息已读
send_group_forward_msg发送合并转发 ( 群聊 )
send_private_forward_msg发送合并转发 ( 好友 )
get_group_msg_history获取群消息历史记录
ocr_image图片 OCR
get_group_system_msg获取群系统消息
get_essence_msg_list获取精华消息列表
get_group_at_all_remain获取群 @全体成员 剩余次数
set_group_portrait设置群头像
set_essence_msg设置精华消息
delete_essence_msg移出精华消息
send_group_sign群打卡这个功能QQ也已经下线了哦~
_send_group_notice发送群公告
_get_group_notice获取群公告
upload_group_file上传群文件
delete_group_file删除群文件使用 del_group_file 代替
create_group_file_folder创建群文件文件夹使用 set_group_file_folder 代替
delete_group_folder删除群文件文件夹使用 del_group_file_folder 代替
get_group_file_system_info获取群文件系统信息部分实现 见接口 get_group_file_count
get_group_root_files获取群根目录文件列表
get_group_files_by_folder获取群子目录文件列表
get_group_file_url获取群文件资源链接NTQQ文件下载方式不同,请使用 get_file
upload_private_file上传私聊文件
reload_event_filter重载事件过滤器napcat没有事件过滤器哦~
download_file下载文件到缓存目录
check_url_safely检查链接安全性
.get_word_slices获取中文分词 ( 隐藏 API )
.handle_quick_operation对事件执行快速操作 ( 隐藏 API )

napcat API

Api介绍可用备注
ArkShareGroup推荐联系人/群聊
ArkSharePeer推荐群聊
get_robot_uin_range获取机器人QQ号区间
set_online_status设置在线状态
get_friends_with_category获取好友分类列表
set_qq_avatar设置头像
get_file获取文件信息
forward_friend_single_msg转发单条信息到私聊
forward_group_single_msg转发单条信息到群聊
translate_en2zh英译中翻译
get_group_file_count获取群文件数
get_group_file_list获取群文件列表
set_group_file_folder新建群文件文件夹
del_group_file删除群文件文件
del_group_file_folder删除群文件文件夹
set_msg_emoji_like设置消息的表情回复
send_forward_msg发送合并转发
mark_private_msg_as_read标记私聊信息已读
mark_group_msg_as_read标记群聊信息已读
get_friend_msg_history获取私聊记录
set_self_profile设置个人资料
create_collection创建文本收藏
get_collection_list获取收藏列表
set_self_longnick设置个人签名
get_recent_contact获取最近的聊天记录
_mark_all_as_read标记所有为已读
get_profile_like获取自身点赞列表
fetch_custom_face获取收藏表情
fetch_emoji_like拉取表情回应列表
set_input_status设置输入状态
get_group_info_ex获取群组额外信息