3版本怎么对群操作 #77
Answered
by
ForteScarlet
yujumpjump
asked this question in
Q&A
-
请问3版本里面怎么对群里面操作呢 比如 禁言 什么的 我在3的文档中没有看到有相关的操作 |
Beta Was this translation helpful? Give feedback.
Answered by
ForteScarlet
Feb 15, 2023
Replies: 1 comment 2 replies
-
直接使用 举个例子,在一个群消息事件中: @Listener
public void onEvent(GroupMessageEvent event) {
Group group = event.getGroup();
group.send(...); // 发送消息
group.mute(...); // 全群禁言(需要注意组件实现差异和注意事项)
GroupMember member = group.getMember(...); // 获取成员
// 成员操作同理
} |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
yujumpjump
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
直接使用
Group
对象。参考 Group举个例子,在一个群消息事件中: