我正在使用simple-slack-api JAVA库:https://github.com/Ullink/simple-slack-api 为用户加入创建事件监听器,并在Slack中离开我的机器人。
我有一个有效的事件监听器,用于跟踪库中提供的示例之后的消息:https://github.com/Ullink/simple-slack-api/blob/master/samples/events/src/main/java/events/ListeningToMessageEvents.java
但是当我尝试使用它为联接创建侦听器时,它什么也没捡?
我的代码:
SlackChannelJoinedListener slackChannelJoinedListener = new SlackChannelJoinedListener() {
@Override
public void onEvent(SlackChannelJoined event, SlackSession session) {
System.out.println("A USER HAS JOINED");
}
};
session.addChannelJoinedListener(slackChannelJoinedListener);