MCPcopy Index your code
hub / github.com/LagrangeDev/LagrangeGo

github.com/LagrangeDev/LagrangeGo @v0.1.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.4 ↗ · + Follow
1,443 symbols 3,332 edges 215 files 267 documented · 19%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

LagrangeGo

ntqq 协议的golang实现 移植于 Lagrange.Core / lagrange-python / MiraiGo

使用前声明

本项目为协议实现,不推荐直接使用。

基于此项目的go-cqhttp已经基本完善 下载链接

也可使用模板框架 LagrangeGo-Template 进行开发。

使用方法

go get -u github.com/LagrangeDev/LagrangeGo

支持的功能

协议支持

已完成功能/开发计划列表

登录 - [x] ~~账号密码登录~~ - [x] 二维码登录 - [ ] 验证码提交 - [ ] 设备锁验证 - [ ] 错误信息解析

消息类型 - [x] 文本 - [x] 图片 - [x] 语音 - [x] 表情 - [x] At - [x] 回复 - [x] 长消息 - [ ] 链接分享 - [x] 小程序(暂只支持RAW) - [x] 短视频 - [x] 合并转发 - [x] 私聊文件&群文件(上传与接收信息)

事件 - [x] 好友消息 - [x] 群消息 - [ ] 临时会话消息 - [x] 登录号加群 - [x] 登录号退群(包含T出) - [x] 新成员进群/退群 - [x] 群/好友消息撤回 - [x] 群禁言 - [x] 群成员权限变更 - [x] 收到邀请进群通知 - [x] 收到其他用户进群请求 - [ ] 新好友 - [x] 新好友请求 - [ ] 客户端离线 - [ ] 群提示 (戳一戳/运气王等)(部分)

主动操作

为防止滥用,不支持主动邀请新成员进群

  • [x] 发送群消息
  • [x] 发送好友消息
  • [ ] 发送临时会话消息
  • [x] 获取/刷新群列表
  • [x] 获取/刷新群成员列表
  • [x] 获取/刷新好友列表
  • [x] 获取群荣誉 (龙王/群聊火焰等)
  • [x] 处理加群请求
  • [x] 处理被邀请加群请求
  • [x] 处理好友请求
  • [x] 撤回群消息
  • [x] 群公告设置
  • [x] 获取群文件下载链接
  • [x] 群设置 (全体禁言/群名)
  • [x] 修改群成员Card
  • [x] 修改群成员头衔
  • [ ] ~~群成员邀请~~
  • [x] 群成员禁言/解除禁言
  • [x] T出群成员
  • [x] 戳一戳群友
  • [x] 获取陌生人信息

不支持的协议

基于 QQ钱包支付用户服务协议 不支持一切有关QQ钱包的协议

4.13 您不得利用本服务实施下列任一的行为: \ (9) 侵害QQ钱包支付服务系統;

  • [ ] ~~QQ钱包协议(收款/付款等)~~

贡献者

Contributors

MiraiGo Contributors

Extension points exported contracts — how you extend this code

Iuid2uin (Interface)
Iuid2uin uid转uin [13 implementers]
client/event/group.go
IMessageElement (Interface)
(no doc) [12 implementers]
message/message.go
ElementBuilder (Interface)
(no doc) [11 implementers]
message/build.go
Provider (Interface)
(no doc) [1 implementers]
client/sign/provider.go
Exchanger (Interface)
(no doc) [1 implementers]
utils/crypto/ecdh/impl.go
Logger (Interface)
(no doc) [1 implementers]
utils/log/log.go
INotifyEvent (Interface)
(no doc) [2 implementers]
client/event/impl.go
IMessage (Interface)
(no doc) [3 implementers]
message/message.go

Core symbols most depended-on inside this repo

Some
called by 85
internal/proto/wrapper.go
sendOidbPacketAndWait
called by 60
client/base.go
BuildOidbPacket
called by 60
client/packets/oidb/builder.go
WriteU32
called by 60
utils/binary/builder.go
Unmarshal
called by 59
internal/proto/wrapper.go
NewBuilder
called by 53
utils/binary/pool.go
WriteBytes
called by 46
utils/binary/builder.go
Marshal
called by 43
internal/proto/wrapper.go

Shape

Struct 613
Method 451
Function 338
TypeAlias 30
Interface 11

Languages

Go100%

Modules by API surface

client/operation.go77 symbols
message/elements.go56 symbols
client/event/group.go43 symbols
message/message.go39 symbols
client/packets/pb/service/oidb/NTV2RichMediaReq.pb.go38 symbols
client/packets/pb/message/element.pb.go36 symbols
client/album.go35 symbols
client/packets/pb/message/notify.pb.go33 symbols
utils/binary/builder.go27 symbols
utils/binary/reader.go26 symbols
client/packets/pb/message/action.pb.go25 symbols
client/base.go23 symbols

For agents

$ claude mcp add LagrangeGo \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact