Commit e04062d2 authored by liujiahua123123's avatar liujiahua123123

update readme

parent a9650ede
......@@ -7,14 +7,14 @@
协议来自网络上开源项目
一切开发旨在学习, 请勿用于非法用途
### 抢先体验
## 抢先体验
现在你可以使用 Mirai 内置的一些测试qq号体验 Mirai, 但我们现在还不建议你使用自己的 qq 号登录
1. Clone
2. Import as Maven project
3. Run [MiraiMain](mirai-core/src/main/java/net/mamoe/mirai/MiraiMain.java#L7)
#### 事件 Hook (Kotlin)
#####java:
### 事件 Hook (Kotlin)
####java:
```
MiraiEventHook.onEvent(FriendMessageEvent.class)
.handler(a -> {
......@@ -23,7 +23,7 @@ MiraiEventHook.onEvent(FriendMessageEvent.class)
})
.mountAlways();
```
#####kotlin:
####kotlin:
```
FriendMessageEvent::class.hookAlways{
if(it.message() valueEquals "你好")
......@@ -32,20 +32,20 @@ FriendMessageEvent::class.hookAlways{
```
![AYWVE86P](.github/A%7DYWVE860U%28%25YQD%24R1GB1%5BP.png)
#### 图片测试
### 图片测试
**现在可以接受图片消息**(并解析为消息链):
![JsssF](.github/J%5DCE%29IK4BU08%28EO~UVLJ%7B%5BF.png)
![](.README_images/68f8fec9.png)
不过我们还正在努力做发送图片
### 代码结构
## 代码结构
Network部分使用 Kotlin 完成(因为kt有对 unsigned byte 的支持).
与插件相关性强(或其他在二次开发中容易接触)的部分尽量使用 Java 完成,
若使用 Kotlin, 我们会通过 Java interface 实现或 javadoc 帮助未接触过 Kotlin 的开发者.
即使你完全不了解 Kotlin, 你也可以正常开发.
## TODO
# TODO
- [x] 事件(Event)模块
- [ ] 插件(Plugin)模块 **(Working on)**
- [x] Network - Touch
......@@ -63,11 +63,11 @@ Network部分使用 Kotlin 完成(因为kt有对 unsigned byte 的支持).
<br>
## 使用方法
### 要求
# 使用方法
## 要求
- Java 11 或更高
- Kotlin 1.3 或更高
### 插件开发
## 插件开发
``` text
to be continued
...
......@@ -80,11 +80,11 @@ 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>
## Usage
### Requirements
# Usage
## Requirements
- Java 11 or higher
- Kotlin 1.3 or higher
### Plugin Development
## Plugin Development
``` text
to be continued
...
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment