mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-07 16:40:43 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
cdbf49545e
20
README.md
20
README.md
@ -12,8 +12,6 @@ Mirai 的所有模块均开源
|
||||
## 抢先体验
|
||||
核心框架结构已经开发完毕,一些核心功能也测试完成。
|
||||
仅需几分钟就可以测试 Mirai.
|
||||
现在你可以登录小号来测试 Mirai.
|
||||
即使测试消息时未发现冻结情况,我们也无法100%保证账号冻结不会发生。
|
||||
|
||||
目前还没有写构建,请使用 IDE 运行单个 main 函数。
|
||||
1. Clone
|
||||
@ -34,24 +32,6 @@ subscribeAlways<FriendMessageEvent>{
|
||||
}
|
||||
```
|
||||
|
||||
##### DSL
|
||||
查看更多: [ListenerBuilder](mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/Subscribers.kt#L87)
|
||||
```kotlin
|
||||
inline fun <reified E: Event> subscribeAll(builder: ListenerBuilder.() -> Unit)
|
||||
|
||||
subscribe<FriendMessageEvent>{
|
||||
always{
|
||||
//it: FriendMessageEvent
|
||||
//coroutineContext: EventScope.coroutineContext
|
||||
}
|
||||
//可同时开始多个监听。
|
||||
always{
|
||||
//it: FriendMessageEvent
|
||||
//coroutineContext: EventScope.coroutineContext
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
![AYWVE86P](.github/A%7DYWVE860U%28%25YQD%24R1GB1%5BP.png)
|
||||
|
||||
### 图片测试
|
||||
|
Loading…
Reference in New Issue
Block a user