萌新解难
-
如何判断是否at自己了
-
- 用类型判断,比如
if(At in MessageChain)
(可能拼错了,大概这个意思 - 用miraicode判断,比如
MeessageChain.toMiraiCode.contain(/*botAt*/)
botAt大概是[mirai:at:/*botid*/]
- 用类型判断,比如
-
if (message.any { it is At && it.target == bot.id }) {} if (message.stream().anyMatch( it -> it instanceof At && ((At) it).getTarget() == bot.getId() )) {}