mirai
2.16.0
common
mirai-core-api
/
net.mamoe.mirai.event
/
MessageSubscribersBuilder
/
startsWith
starts
With
fun
startsWith
(
prefix
:
String
,
trim
:
Boolean
=
true
)
:
MessageSubscribersBuilder.ListeningFilter
<
M
,
Ret
,
R
,
RR
>
fun
startsWith
(
prefix
:
String
,
removePrefix
:
Boolean
=
true
,
trim
:
Boolean
=
true
,
onEvent
:
suspend
M
.
(
String
)
->
R
)
:
Ret
如果消息的前缀是
prefix