Skip to content

Commit c1bcfff

Browse files
committed
bug fix
1 parent e3da071 commit c1bcfff

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/main/kotlin/stageguard/sctimetable/utils/InteractiveConversationHelper.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,8 @@ class InteractiveConversationBuilder(
173173
val calculatedTryLimit = if(tryLimit == -2) (if(UNLIMITED_REPEAT) Int.MAX_VALUE else tryCountLimitation) else (if(tryLimit == -1) Int.MAX_VALUE else tryLimit)
174174
val calculatedTimeLimit = if(timeoutLimit == -2L) (if(UNLIMITED_TIME) Long.MAX_VALUE else timeoutLimitation) else (if(timeoutLimit == -1L) Long.MAX_VALUE else timeoutLimit)
175175
repeat(calculatedTryLimit) {
176-
runCatching {
177-
val nextMsg = eventContext.nextMessage(calculatedTimeLimit)
178-
if(checkBlock(nextMsg)) return mapBlock(nextMsg)
179-
}
176+
val nextMsg = eventContext.nextMessage(calculatedTimeLimit)
177+
runCatching { if(checkBlock(nextMsg)) return mapBlock(nextMsg) }
180178
send("mismatched message.")
181179
}
182180
throw QuitConversationExceptions.IllegalInputException()
@@ -247,7 +245,6 @@ class InteractiveConversationBuilder(
247245

248246
/**
249247
* 只有文本消息且消息符合正则表达式时执行
250-
*
251248
*/
252249
suspend inline infix fun Regex.matchRun(crossinline caseLambda: suspend (String) -> Unit) {
253250
when(val content = contentImpl({

0 commit comments

Comments
 (0)