matchMessage
inline fun <E : MessageEvent, M : Message.Element<M>> SimpleListenerBuilder<E>.matchMessage(messageKey: Message.Key<M>, require: Boolean = true, crossinline matcher: suspend EventListenerProcessingContext.(E, M, index: Int) -> Boolean)(source)
buildSimpleListener(FooMessageEvent) {
matchMessage(At, require = false) { event: FooMessageEvent, at: At, index: Int -> // this: EventListenerProcessingContext
// ...
at.target.literal != "123"
}
}
Content copied to clipboard