有没有什么功能可以过滤哪些群里面的人不需要监听他 #91
Answered
by
ForteScarlet
yujumpjump
asked this question in
Q&A
-
涉及的编程语言Java 涉及的组件库No response 疑问描述我想机器人不要去监听群里面的哪些人 可以实现吗 |
Beta Was this translation helpful? Give feedback.
Answered by
ForteScarlet
Mar 1, 2023
Replies: 1 comment
-
自行通过逻辑判断即可 private static final Set<String> excludes = ...;
@Listener
public void onEvent(GroupMessageEvent event) {
var authorId = event.getAuthor().getId().toString();
if (excludes.contains(authorId)) { return; }
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ForteScarlet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
自行通过逻辑判断即可