Skip to content

有没有什么功能可以过滤哪些群里面的人不需要监听他 #91

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

You must be logged in to vote

自行通过逻辑判断即可

private static final Set<String> excludes = ...;

@Listener
public void onEvent(GroupMessageEvent event) {
    var authorId = event.getAuthor().getId().toString();
    if (excludes.contains(authorId)) { return; }
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
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
None yet
2 participants