diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/MessageSubscribers.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/MessageSubscribers.kt index fce07df06..ee8a75cfd 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/MessageSubscribers.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/MessageSubscribers.kt @@ -56,7 +56,7 @@ inline fun CoroutineScope.subscribeGroupMessages(crossinline listeners: Mess } return MessageSubscribersBuilder { listener -> subscribeAlways { - listener(it, this.message.toString()) + listener(this, this.message.toString()) } }.run(listeners) } @@ -72,7 +72,7 @@ inline fun CoroutineScope.subscribeFriendMessages(crossinline listeners: Mes } return MessageSubscribersBuilder { listener -> subscribeAlways { - listener(it, this.message.toString()) + listener(this, this.message.toString()) } }.run(listeners) } @@ -88,7 +88,7 @@ inline fun Bot.subscribeMessages(crossinline listeners: MessageSubscribersBu } return MessageSubscribersBuilder> { listener -> this.subscribeAlways { - listener(it, this.message.toString()) + listener(this, this.message.toString()) } }.run(listeners) } @@ -104,7 +104,7 @@ inline fun Bot.subscribeGroupMessages(crossinline listeners: MessageSubscrib } return MessageSubscribersBuilder { listener -> this.subscribeAlways { - listener(it, this.message.toString()) + listener(this, this.message.toString()) } }.run(listeners) } @@ -120,7 +120,7 @@ inline fun Bot.subscribeFriendMessages(crossinline listeners: MessageSubscri } return MessageSubscribersBuilder { listener -> this.subscribeAlways { - it.listener(it.message.toString()) + listener(this, this.message.toString()) } }.run(listeners) }