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
a50f1c72
Commit
a50f1c72
authored
Apr 14, 2020
by
Him188
Committed by
GitHub
Apr 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update docs
parent
b6677e1e
Changes
1
Show 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 @
a50f1c72
...
@@ -35,7 +35,7 @@ import kotlin.jvm.JvmSynthetic
...
@@ -35,7 +35,7 @@ import kotlin.jvm.JvmSynthetic
* reply("开启复读模式")
* reply("开启复读模式")
*
*
* whileSelectMessages {
* whileSelectMessages {
* "stop"
`->`
{
* "stop" {
* reply("已关闭复读")
* reply("已关闭复读")
* false // 停止循环
* false // 停止循环
* }
* }
...
@@ -90,8 +90,8 @@ suspend inline fun <reified T : ContactMessage> T.selectMessagesUnit(
...
@@ -90,8 +90,8 @@ suspend inline fun <reified T : ContactMessage> T.selectMessagesUnit(
*
*
* ```kotlin
* ```kotlin
* val value: String = selectMessages {
* val value: String = selectMessages {
* "hello"
`->`
{ "111" }
* "hello" { "111" }
* "hi"
`->`
{ "222" }
* "hi" { "222" }
* startsWith("/") { it }
* startsWith("/") { it }
* default { "default" }
* default { "default" }
* }
* }
...
@@ -234,7 +234,7 @@ abstract class MessageSelectBuilder<M : ContactMessage, R> @PublishedApi interna
...
@@ -234,7 +234,7 @@ abstract class MessageSelectBuilder<M : ContactMessage, R> @PublishedApi interna
/**
/**
* [selectMessagesUnit] 或 [selectMessages] 时的 DSL 构建器.
* [selectMessagesUnit] 或 [selectMessages] 时的 DSL 构建器.
*
*
* 它是特殊化的消息监听 ([subscribeMessages]) DSL
, 没有屏蔽 `reply` DSL 以确保作用域安全性
* 它是特殊化的消息监听 ([subscribeMessages]) DSL
*
*
* @see MessageSubscribersBuilder 查看上层 API
* @see MessageSubscribersBuilder 查看上层 API
*/
*/
...
@@ -443,7 +443,14 @@ inline class MessageSelectionTimeoutChecker internal constructor(val timeoutMill
...
@@ -443,7 +443,14 @@ inline class MessageSelectionTimeoutChecker internal constructor(val timeoutMill
class
MessageSelectionTimeoutException
:
RuntimeException
()
class
MessageSelectionTimeoutException
:
RuntimeException
()
// implementations
/////////////////////////
//// implementations ////
/////////////////////////
@JvmSynthetic
@JvmSynthetic
...
...
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