mirai-core / net.mamoe.mirai.event / MessageSubscribersBuilder / startsWith

startsWith

fun startsWith(prefix: String, trim: Boolean = true): ListeningFilter<M, Ret, R, RR>
fun startsWith(prefix: String, removePrefix: Boolean = true, trim: Boolean = true, onEvent: suspend M.(String) -> R): Ret

如果消息的前缀是 prefix