2019-08-07 18:14:29 +08:00
|
|
|
# Mirai
|
2019-08-08 12:45:12 +08:00
|
|
|
|
2019-08-18 23:38:04 +08:00
|
|
|
一个以<b>TIM QQ协议</b>驱动的JAVA(+Kotlin) QQ机器人服务端核心
|
2019-08-18 23:19:04 +08:00
|
|
|
我们坚持免费与开源
|
|
|
|
|
2019-09-08 01:24:18 +08:00
|
|
|
项目处于快速开发阶段
|
2019-09-01 22:48:42 +08:00
|
|
|
协议来自网络上开源项目
|
2019-09-08 19:58:47 +08:00
|
|
|
一切开发旨在学习, 请勿用于非法用途
|
2019-09-01 01:57:14 +08:00
|
|
|
|
2019-08-24 15:36:59 +08:00
|
|
|
### 代码结构
|
2019-09-01 22:48:42 +08:00
|
|
|
Network部分使用 Kotlin 完成(因为kt有对 unsigned byte 的支持).
|
2019-09-08 12:00:06 +08:00
|
|
|
与插件相关性强(或其他在二次开发中容易接触)的部分尽量使用 Java 完成,
|
|
|
|
若使用 Kotlin, 我们会通过 Java interface 实现或 javadoc 帮助未接触过 Kotlin 的开发者.
|
|
|
|
即使你完全不了解 Kotlin, 你也可以正常开发.
|
2019-09-01 01:56:40 +08:00
|
|
|
|
2019-09-08 01:24:18 +08:00
|
|
|
### 抢先体验
|
2019-09-08 19:58:47 +08:00
|
|
|
现在你可以使用 Mirai 内置的一些测试qq号体验 Mirai, 但我们现在还不建议你使用自己的 qq 号登录
|
2019-09-08 01:24:18 +08:00
|
|
|
1. Clone
|
|
|
|
2. Import as Maven project
|
|
|
|
3. Run [MiraiMain](mirai-core/src/main/java/net/mamoe/mirai/MiraiMain.java#L7)
|
2019-09-08 19:29:21 +08:00
|
|
|
|
2019-09-08 19:58:47 +08:00
|
|
|
#### 事件 Hook (Kotlin)
|
2019-09-08 19:29:21 +08:00
|
|
|
![event hook.png](.github/event%20hook.png)
|
2019-09-08 19:58:47 +08:00
|
|
|
![AYWVE86P](.github/A%7DYWVE860U%28%25YQD%24R1GB1%5BP.png)
|
|
|
|
|
|
|
|
#### 图片测试
|
|
|
|
**现在可以接受图片消息**(并解析为消息链):
|
|
|
|
![JsssF](.github/J%5DCE%29IK4BU08%28EO~UVLJ%7B%5BF.png)
|
2019-09-10 21:23:39 +08:00
|
|
|
![](.github/68f8fec9.png)
|
2019-09-08 19:58:47 +08:00
|
|
|
|
|
|
|
不过我们还正在努力做发送图片
|
2019-09-08 19:29:21 +08:00
|
|
|
|
2019-08-24 15:36:59 +08:00
|
|
|
### TODO
|
|
|
|
- [x] 事件(Event)模块
|
2019-09-08 01:24:18 +08:00
|
|
|
- [ ] 插件(Plugin)模块 **(Working on)**
|
2019-08-24 15:36:59 +08:00
|
|
|
- [x] Network - Touch
|
2019-09-08 01:32:18 +08:00
|
|
|
- [X] Network - Login
|
2019-09-01 22:48:42 +08:00
|
|
|
- [X] Network - Session
|
2019-09-07 19:57:32 +08:00
|
|
|
- [X] Network - Verification Code
|
2019-09-01 22:48:42 +08:00
|
|
|
- [X] Network - Message Receiving
|
|
|
|
- [X] Network - Message Sending
|
2019-09-08 01:24:18 +08:00
|
|
|
- [ ] Network - Events **(Working on)**
|
2019-09-08 20:53:54 +08:00
|
|
|
- [ ] Bot - Friend/group list
|
|
|
|
- [ ] Bot - Actions(joining group, adding friend, etc.)
|
2019-09-01 22:48:42 +08:00
|
|
|
- [ ] Message Section **(Working on)**
|
|
|
|
- [ ] Contact
|
2019-09-07 19:57:32 +08:00
|
|
|
- [ ] UI
|
2019-08-24 15:36:59 +08:00
|
|
|
|
2019-08-08 12:45:12 +08:00
|
|
|
<br>
|
|
|
|
|
2019-08-08 12:51:21 +08:00
|
|
|
## 使用方法
|
|
|
|
### 要求
|
2019-08-17 13:17:56 +08:00
|
|
|
- Java 11 或更高
|
2019-09-01 01:56:40 +08:00
|
|
|
- Kotlin 1.3 或更高
|
2019-08-08 12:51:21 +08:00
|
|
|
### 插件开发
|
2019-09-08 01:24:18 +08:00
|
|
|
``` text
|
2019-09-01 01:48:27 +08:00
|
|
|
to be continued
|
2019-08-08 12:51:21 +08:00
|
|
|
...
|
|
|
|
```
|
|
|
|
|
|
|
|
|
2019-09-08 19:58:47 +08:00
|
|
|
<br>
|
|
|
|
|
|
|
|
A JAVA(+Kotlin) powered open-source project under GPL license<br>
|
|
|
|
It use protocols from <i>TIM QQ</i>, that is, it won't be affected by the close of <i>Smart QQ</i><br>
|
|
|
|
The project is all for <b>learning proposes</b> and still in <b>developing stage</b><br>
|
|
|
|
|
2019-08-08 12:51:21 +08:00
|
|
|
## Usage
|
|
|
|
### Requirements
|
2019-08-17 13:16:15 +08:00
|
|
|
- Java 11 or higher
|
2019-09-01 01:56:40 +08:00
|
|
|
- Kotlin 1.3 or higher
|
|
|
|
### Plugin Development
|
2019-09-08 01:24:18 +08:00
|
|
|
``` text
|
2019-09-01 01:48:27 +08:00
|
|
|
to be continued
|
2019-08-08 12:51:21 +08:00
|
|
|
...
|
|
|
|
```
|
2019-08-08 12:45:12 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|