Skip to content

如何获取群成员的头衔?(群主设置的专属头衔) #53

Answered by ForteScarlet
hxtscjk17373 asked this question in Q&A
Discussion options

You must be logged in to vote

see component-mirai#61
监听Mirai组件事件或判断群成员对象 MemberMiraiMember 类型时可使用相关操作。

Member member = group.getMember(...);
if (member instanceof MiraiMember miraiMember) {
     String title = miraiMember.getSpecialTitle();
     miraiMember.setSpecialTitle(...);
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hxtscjk17373
Comment options

Answer selected by ForteScarlet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
组件:mirai 与mirai组件有关的内容
2 participants