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

containsReply

open fun String.containsReply(reply: String): Nothing
Deprecated: Using `reply` DSL in message selection is prohibited

消息内容包含 this 则回复 reply

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

消息内容包含 this 则执行 replier 并将其返回值回复给发信对象.

replierit 将会是消息内容 string.

Parameters

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