diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/Subscribers.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/Subscribers.kt index 1d2f59044..3c292b27c 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/Subscribers.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/Subscribers.kt @@ -106,9 +106,7 @@ internal suspend fun KClass.subscribeWhileNull(listener: s @ListenersBuilderDsl @PublishedApi internal suspend fun KClass.subscribeAll(listeners: suspend ListenerBuilder.() -> Unit) { - with(ListenerBuilder { this.subscribeInternal(it) }) { - listeners() - } + listeners(ListenerBuilder { this.subscribeInternal(it) }) } /**