Skip to content

Commit 902a5ec

Browse files
committed
do not warn if received meta event
1 parent f434572 commit 902a5ec

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

overflow-core/src/main/kotlin/top/mrxiaom/overflow/internal/plugin/OverflowCoreAsPlugin.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import top.mrxiaom.overflow.event.UnsolvedOnebotEvent
4242
import top.mrxiaom.overflow.internal.Overflow
4343
import top.mrxiaom.overflow.internal.asOnebot
4444
import top.mrxiaom.overflow.internal.message.OnebotMessages
45+
import top.mrxiaom.overflow.internal.message.OnebotMessages.string
4546
import top.mrxiaom.overflow.internal.utils.LoggerInFolder
4647
import java.io.File
4748
import kotlin.reflect.jvm.jvmName
@@ -117,7 +118,9 @@ internal object OverflowCoreAsPlugin : Plugin, CommandOwner {
117118

118119
channel.subscribeAlways<UnsolvedOnebotEvent>(priority = EventPriority.LOWEST) {
119120
if (!isCancelled) {
120-
logger.warning("接收到来自协议端的未知事件 $messageRaw")
121+
if (json["post_type"]?.string?.equals("meta_event") == false) {
122+
logger.warning("接收到来自协议端的未知事件 $messageRaw")
123+
}
121124
}
122125
}
123126

0 commit comments

Comments
 (0)