Skip to content

API 列表

LLOneBot 实现了 OneBot 11 以及 go-cqhttp 的大部分 API

接口详细示例: 点击跳转

连接方式支持情况

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

API 支持情况

OneBot 11

TIP

详细用法参阅 OneBot 11 文档go-cqhttp 文档

功能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_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
获取 Cookiesget_cookies
获取 CSRF Tokenget_csrf_token
获取 QQ 相关接口凭证get_credentials
获取语音get_record
获取图片信息get_image
检查是否可以发送图片can_send_image
检查是否可以发送语音can_send_record
获取状态get_status
获取版本信息get_version_info
重启set_restart
清理缓存clean_cache

Go-CQHTTP

TIP

详细用法参阅 go-cqhttp 文档

功能API可用
设置登录号资料set_qq_profile
删除好友delete_friend
标记消息已读mark_msg_as_read
发送合并转发 ( 群聊 )send_group_forward_msg
发送合并转发 ( 好友 )send_private_forward_msg
获取群消息历史记录get_group_msg_history
图片 OCRocr_image
获取群系统消息get_group_system_msg
获取精华消息列表get_essence_msg_list
获取群 @全体成员 剩余次数get_group_at_all_remain
设置群头像set_group_portrait
设置精华消息set_essence_msg
移出精华消息delete_essence_msg
发送群公告_send_group_notice
获取群公告_get_group_notice
上传群文件upload_group_file
删除群文件delete_group_file
创建群文件文件夹create_group_file_folder
删除群文件文件夹delete_group_folder
获取群文件系统信息get_group_file_system_info
获取群根目录文件列表get_group_root_files
获取群子目录文件列表get_group_files_by_folder
获取群文件资源链接get_group_file_url
上传私聊文件upload_private_file
下载文件到缓存目录download_file
对事件执行快速操作.handle_quick_operation

LLOneBot

TIP

详细用法参阅 https://llonebot.apifox.cn

功能API可用
设置头像set_qq_avatar
获取文件信息get_file
转发单条信息到私聊forward_friend_single_msg
转发单条信息到群聊forward_group_single_msg
设置消息的表情回应set_msg_emoji_like
获取好友分类列表get_friends_with_category
设置自身在线状态set_online_status
获取自身点赞列表get_profile_like
发送合并转发消息send_forward_msg
获取收藏表情fetch_custom_face
获取好友历史消息记录get_friend_msg_history
获取表情回应列表fetch_emoji_like
获取官方机器人 QQ 号区间get_robot_uin_range
好友戳一戳friend_poke
群组戳一戳group_poke
设置好友备注set_friend_remark
移动好友到分组set_friend_category
设置群备注set_group_remark
设置群消息接收方式set_group_msg_mask
移动群文件move_group_file
获取群禁言列表get_group_shut_list
重命名群文件文件夹名rename_group_file_folder