Skip to content

Commit

Permalink
Merge branch 'master' into fix-exchange_emp
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama authored Aug 1, 2023
2 parents de3bc3a + b49cd23 commit e4f2758
Show file tree
Hide file tree
Showing 231 changed files with 10,007 additions and 40,628 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Go

on:
push:
branches: [ master ]
branches: [ master, typeparam ]
pull_request:
branches: [ master ]
branches: [ master, typeparam ]

jobs:

Expand All @@ -16,7 +16,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
go-version: '1.20'

- name: Check out code into the Go module directory
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/goimports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
go-version: 1.19

- name: Check out code into the Go module directory
uses: actions/checkout@v2
Expand Down
52 changes: 52 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
.PHONY: protoc-gen-golite-version clean install-protoc-plugin proto
.DEFAULT_GOAL := proto

PROTO_DIR=client/pb
PROTO_OUTPUT_PATH=client
PROTO_IMPORT_PATH=client

PROTO_FILES := \
$(PROTO_DIR)/*.proto \
$(PROTO_DIR)/channel/*.proto \
$(PROTO_DIR)/cmd0x3f6/*.proto \
$(PROTO_DIR)/cmd0x6ff/*.proto \
$(PROTO_DIR)/cmd0x346/*.proto \
$(PROTO_DIR)/cmd0x352/*.proto \
$(PROTO_DIR)/cmd0x388/*.proto \
$(PROTO_DIR)/exciting/*.proto \
$(PROTO_DIR)/faceroam/*.proto \
$(PROTO_DIR)/highway/*.proto \
$(PROTO_DIR)/longmsg/*.proto \
$(PROTO_DIR)/msf/*.proto \
$(PROTO_DIR)/msg/*.proto \
$(PROTO_DIR)/msgtype0x210/*.proto \
$(PROTO_DIR)/multimsg/*.proto \
$(PROTO_DIR)/notify/*.proto \
$(PROTO_DIR)/oidb/*.proto \
$(PROTO_DIR)/profilecard/*.proto \
$(PROTO_DIR)/pttcenter/*.proto \
$(PROTO_DIR)/qweb/*.proto \
$(PROTO_DIR)/richmedia/*.proto \
$(PROTO_DIR)/structmsg/*.proto \
$(PROTO_DIR)/web/*.proto

PROTOC_GEN_GOLITE_VERSION := \
$(shell grep "github.com/RomiChan/protobuf" go.mod | awk -F v '{print "v"$$2}')

protoc-gen-golite-version:
@echo "Use protoc-gen-golite version: $(PROTOC_GEN_GOLITE_VERSION)"

clean:
find . -name "*.pb.go" | xargs rm -f

install-protoc-plugin: protoc-gen-golite-version
go install github.com/RomiChan/protobuf/cmd/protoc-gen-golite@$(PROTOC_GEN_GOLITE_VERSION)

proto: install-protoc-plugin
protoc --golite_out=$(PROTO_OUTPUT_PATH) --golite_opt=paths=source_relative -I=$(PROTO_IMPORT_PATH) $(PROTO_FILES)

fmt:
go vet -stdmethods=false ./...

.EXPORT_ALL_VARIABLES:
GO111MODULE = on
46 changes: 31 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
# MiraiGo
qq-android协议的golang实现 移植于mirai
qq-android 协议的golang实现 移植于 [mirai](https://github.com/mamoe/mirai)

# 警告
本项目为协议实现,api非常原始,并不推荐使用
## 使用前声明
本项目为协议实现,不推荐直接使用

建议基于 [go-cqhttp](https://github.com/Mrs4s/go-cqhttp) 使用框架开发
CQHTTP 用户建议使用基于 [go-cqhttp](https://github.com/Mrs4s/go-cqhttp) 的框架开发

同时提供不基于 CQHTTP 的原生框架 [MiraiGo-Template](https://github.com/Logiase/MiraiGo-Template) 进行开发。
同时也提供原生框架 [MiraiGo-Template](https://github.com/Logiase/MiraiGo-Template) 进行开发。

# 已完成功能/开发计划
#### 登录
## 使用方法

```bash
go get -u github.com/Mrs4s/MiraiGo
```

## 支持的功能

## 协议支持

<details>
<summary>已完成功能/开发计划列表</summary>

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

#### 消息类型
**消息类型**
- [x] 文本
- [x] 图片
- [x] 语音
Expand All @@ -30,25 +42,26 @@ qq-android协议的golang实现 移植于mirai
- [x] 合并转发
- [x] 群文件(上传与接收信息)

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

**主动操作**

#### 主动操作
> 为防止滥用,将不支持主动邀请新成员进群
_为防止滥用,不支持主动邀请新成员进群_

- [x] 发送群消息
- [x] 发送好友消息
Expand All @@ -72,11 +85,14 @@ qq-android协议的golang实现 移植于mirai
- [x] 戳一戳群友
- [x] 获取陌生人信息

#### 敏感操作
> 由于[QQ钱包支付用户服务协议](https://www.tenpay.com/v2/html5/basic/public/agreement/protocol_mqq_pay.shtml), 将不支持一切有关QQ钱包的协议
</details>

### 不支持的协议
**基于 [QQ钱包支付用户服务协议](https://www.tenpay.com/v2/html5/basic/public/agreement/protocol_mqq_pay.shtml) 不支持一切有关QQ钱包的协议**

>4.13 您不得利用本服务实施下列任一的行为:
>\
> (9) **侵害QQ钱包支付服务系統;**
- [ ] ~~QQ钱包协议(收款/付款等)~~

Loading

0 comments on commit e4f2758

Please sign in to comment.