mirai-core / net.mamoe.mirai.event / MessageSelectBuilder / endsWithReply

endsWithReply

open fun String.endsWithReply(replier: suspend M.(String) -> Any?): Nothing
Deprecated: Using `reply` DSL in message selection is prohibited

不考虑空格, 消息内容this 结尾则执行 replier 并将其返回值回复给发信对象.

Parameters

replier - 若返回 Message 则直接发送; 若返回 Unit 则不回复; 其他情况则 Any.toString 后回复