Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
f8d27607
Commit
f8d27607
authored
Apr 15, 2020
by
Him188
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
6eb4423b
a50f1c72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/select.kt
...ore/src/commonMain/kotlin/net.mamoe.mirai/event/select.kt
+13
-6
No files found.
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/select.kt
View file @
f8d27607
...
...
@@ -35,7 +35,7 @@ import kotlin.jvm.JvmSynthetic
* reply("开启复读模式")
*
* whileSelectMessages {
* "stop"
`->`
{
* "stop" {
* reply("已关闭复读")
* false // 停止循环
* }
...
...
@@ -90,8 +90,8 @@ suspend inline fun <reified T : ContactMessage> T.selectMessagesUnit(
*
* ```kotlin
* val value: String = selectMessages {
* "hello"
`->`
{ "111" }
* "hi"
`->`
{ "222" }
* "hello" { "111" }
* "hi" { "222" }
* startsWith("/") { it }
* default { "default" }
* }
...
...
@@ -234,7 +234,7 @@ abstract class MessageSelectBuilder<M : ContactMessage, R> @PublishedApi interna
/**
* [selectMessagesUnit] 或 [selectMessages] 时的 DSL 构建器.
*
* 它是特殊化的消息监听 ([subscribeMessages]) DSL
, 没有屏蔽 `reply` DSL 以确保作用域安全性
* 它是特殊化的消息监听 ([subscribeMessages]) DSL
*
* @see MessageSubscribersBuilder 查看上层 API
*/
...
...
@@ -443,7 +443,14 @@ inline class MessageSelectionTimeoutChecker internal constructor(val timeoutMill
class
MessageSelectionTimeoutException
:
RuntimeException
()
// implementations
/////////////////////////
//// implementations ////
/////////////////////////
@JvmSynthetic
...
...
@@ -640,4 +647,4 @@ internal suspend inline fun <reified T : ContactMessage> T.whileSelectMessagesIm
subscribeAlways
.
complete
()
deferred
=
null
coroutineContext
.
cancelChildren
()
}
\ No newline at end of file
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment