diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/select.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/select.kt index 01b9fb323..a7c3c664d 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/select.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/select.kt @@ -128,6 +128,9 @@ abstract class MessageSelectBuilder, R> @PublishedApi in onEvent: @MessageDsl suspend M.(N) -> R ) = error("prohibited") + @Deprecated("Use `default` instead", level = DeprecationLevel.HIDDEN) + override fun always(onEvent: MessageListener) = error("prohibited") + @Deprecated("Using `reply` DSL in message selection is prohibited", level = DeprecationLevel.HIDDEN) override infix fun MessageSelectionTimeoutChecker.reply(block: suspend () -> Any?): Nothing = error("prohibited") @@ -203,9 +206,7 @@ abstract class MessageSelectBuilderUnit, R> @PublishedAp abstract fun default(onEvent: MessageListener) // 需要后置默认监听器 @Deprecated("Use `default` instead", level = DeprecationLevel.HIDDEN) - override fun always(onEvent: MessageListener) { - super.always(onEvent) - } + override fun always(onEvent: MessageListener) = error("prohibited") /** * 限制本次 select 的最长等待时间, 当超时后抛出 [TimeoutCancellationException]