Skip to content

Commit

Permalink
0.29.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Him188 committed Mar 22, 2020
1 parent f87a820 commit 9029dab
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,49 @@

开发版本. 频繁更新, 不保证高稳定性

## `0.29.0` 2020/3/22
- 引入新消息监听 DSL: `whileSelectMessages`, 简化连续监听过程
```kotlin
bot.subscribeMessages {
"开启复读模式" `->` {
reply("成功开启")
whileSelectMessages {
"stop" `->` {
reply("已关闭复读")
false // 停止循环
}
default {
reply(message)
true // 继续循环
}
}
reply("复读模式结束")
}
}
```
- 引入新消息监听 DSL: `selectMessages`, 简化筛选监听过程
```kotlin
bot.subscribeMessages {
"test" `->` {
reply("choose option: 'hello', 'hi'")
val value: String = selectMessages {
"hello" `->` { "123" }
"hi" `->` { "222" }
default { "default value" }
}
reply(value)
}
}
```

- 监听消息的 DSL 新增 `infix fun String.->(block)`
- 处理 `StatSvc.ReqMSFOffline` (#150)
- `Contact.sendMessage` 现在接受 `Message` 参数, 而不是 `MessageChain` 以兼容 `CombinedMessage`
- `Member.sendMessage` 现在返回 `MessageReceipt<Member>` 而不是 QQ 泛型
- 调整 JVM `MessageUtils` 中一些方法的可见性 (`@JvmSynthetic`)
- 调整命名: `OfflineImage.queryOriginUrl` 改为 `OfflineImage.queryUrl`
- 允许手动重新初始化 `Bot` (`BotNetworkHandler.init`), 确保重初始化资源释放

## `0.28.0` 2020/3/19
- 修复 Jce 反序列化在部分情况下出错的问题, 修复 #145
- 新增群公告低级 API
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# style guide
kotlin.code.style=official
# config
miraiVersion=0.28.0
miraiVersion=0.29.0
kotlin.incremental.multiplatform=true
kotlin.parallel.tasks.in.project=true
# kotlin
Expand Down

0 comments on commit 9029dab

Please sign in to comment.