mirai-core / net.mamoe.mirai.event / MessageSelectBuilder / mapping
mapping
open fun <N : Any> mapping(mapper: M.(String) -> N?, onEvent: suspend M.(N) -> R): Nothing
Deprecated: Using `reply` DSL in message selection is prohibited
如果 mapper 返回值非空, 就执行 onEvent