Creating an event - Alhxe/Discord-Integration GitHub Wiki
Creating an event
All the events are in the JDA library. I'm going to give an example of creating an event about when they react to a message.
We create a class that extends ListenerAdapter. Then we add the events we want. In eclipse it appears to us to implement the events by right clicking on the line of code > source> Override / Implements Methods and we will see all the ones that we can include.

public class ExampleEvent extends ListenerAdapter{
@Override
public void onMessageReactionAdd(MessageReactionAddEvent event) {
// My event
}
}
Then I added it to the api with api.registerDiscordEvent(new ExampleEvent());