Commit f3f8be5f authored by Him188's avatar Him188

Simplify code

parent a5853ba2
......@@ -132,8 +132,7 @@ suspend fun main() {
}
has<Image> {
if (this is FriendMessage || (this is GroupMessage && this.permission == MemberPermission.ADMINISTRATOR)) {
withContext(IO) {
if (this is FriendMessage || (this is GroupMessage && this.permission == MemberPermission.ADMINISTRATOR)) withContext(IO) {
val image: Image by message
// 等同于 val image = message[Image]
......@@ -145,7 +144,7 @@ suspend fun main() {
reply(e.message ?: e::class.java.simpleName)
}
}
}
}
startsWith("上传图片", removePrefix = true) handler@{
......
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