Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

oicq-cdp

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oicq-cdp

resolve oicq slider captcha by chrome cdp

latest
Source
npmnpm
Version
0.0.0
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

node-onebot

将机器人部署为独立的服务,通过http或ws与外界通信

  • 基于 npm-oicq 的QQ机器人Http-Api
  • onebot(cqhttp) 协议的实现
  • 当前master分支下的版本基本不会再有变化,及时更新依赖即可获得新特性和已知bug的修复。
  • 如何获得滑动验证码的ticket
  • 常见问题

core node engine

使用方法:

  • 下载安装 nodejs
  • 下载此源码包 (建议用git clone)
  • 重命名 config.sample.jsconfig.js 并配置
  • 运行 node main 123456789 (数字是登陆账号)
  • 今后启动只需最后一步
  • 只有首次登陆时需要交互(密码、验证码、设备锁),之后推荐使用pm2或forever等部署工具。

通信

  • HTTP和正向WS服务器
  • POST上报(多点)
  • 反向WS连接(多点)

API (参考文档)

已实现(文档中已列出)
名称备注
get_friend_list
get_group_list
get_group_info
get_group_member_list
get_group_member_info
get_stranger_info
send_private_msgmessage_id是string
send_group_msgmessage_id是string
send_msg
delete_msg
get_msg
set_friend_add_request
set_group_add_request
set_group_special_title
set_group_admin
set_group_card
set_group_kick
set_group_ban
set_group_leave
set_group_name
set_group_whole_ban
set_group_anonymous_ban仅支持flag字段,不支持另外两种
set_group_anonymous
send_like
get_login_info
can_send_image
can_send_record
get_status
get_version_info
.handle_quick_operation仅WS有效
get_cookies
get_csrf_token
clean_cache
已实现(新增)
名称参数备注
get_stranger_list获取陌生人列表
send_discuss_msgdiscuss_id
message
auto_escape
发讨论组消息,没有message_id
send_group_noticecontent发送群公告
send_group_pokegroup_id
user_id
群戳一戳,未来可能会用CQ码实现
set_online_statusstatus设置在线状态(※仅限手机协议支持)
11我在线上 31离开 41隐身 50忙碌 60Q我吧 70请勿打扰
add_groupgroup_id
comment
加群和加好友是风险接口,频繁调用账号会被风控
add_friendgroup_id
user_id
comment
添加好友
暂时只能添加群员
delete_frienduser_id
block
删除好友
block默认为true
invite_friendgroup_id
user_id
邀请好友入群
set_nicknamenickname设置昵称
set_gendergender设置性别 0未知 1男 2女
set_birthdaybirthday设置生日 格式:20110202
set_descriptiondescription设置个人说明
set_signaturesignature设置签名
set_portraitfile设置个人头像,与CQ码中的file格式相同
set_group_portraitfile设置群头像
尚未实现
名称
get_forward_msg
get_group_honor_info
get_credentials
get_vip_info
get_record
get_image
set_restart

Events

点开

新版事件的notice部分的上报格式默认与cqhttp中的格式不同。
如需使用cqhttp格式,在config.js中将use_cqhttp_notice设置为true

新版格式(文档)cqhttp格式(文档)
好友请求request.friend.addrequest.friend
加群请求request.group.addrequest.group.add
加群邀请request.group.inviterequest.group.invite
好友消息message.private.friendmessage.private.friend
单向好友message.private.single
临时会话message.private.groupmessage.private.group
临时会话message.private.othermessage.private.other
群聊消息message.group.normalmessage.group.normal
匿名消息message.group.anonymousmessage.group.anonymous
讨论组消message.discuss
好友增加notice.friend.increasenotice.friend_add
好友减少notice.friend.decrease
好友撤回notice.friend.recallnotice.friend_recall
资料变更notice.friend.profile
群员增加notice.group.increasenotice.group_increase
群员减少notice.group.decreasenotice.group_decrease
群组撤回notice.group.recallnotice.group_recall
管理变更notice.group.adminnotice.group_admin
群组禁言notice.group.bannotice.group_ban
群组转让notice.group.transfer
群组文件表现为CQ码notice.group_upload
头衔变更notice.group.title
群戳一戳notice.group.poke
群设置变notice.group.setting
元事件meta_event.lifecycle.enablemeta_event.lifecycle.enable
元事件meta_event.lifecycle.disablemeta_event.lifecycle.disable
元事件meta_event.lifecycle.connectmeta_event.lifecycle.connect
元事件meta_event.heartbeatmeta_event.heartbeat

支持的CQ码

其他

  • 字符串或数组消息段
  • 鉴权
  • WS心跳
  • _async异步调用api
  • _rate_limited限速调用api
  • 事件过滤器
  • 设置风控重发
  • 设置允许跨域请求
  • 设置监听自己消息
  • 自动更新内核版本

Keywords

qq

FAQs

Package last updated on 24 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts