Package net.dv8tion.jda.api.hooks
Interface EventListener
- All Known Implementing Classes:
ListenerAdapter,Once
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
JDA pushes
GenericEvents to the registered EventListeners.
Register an EventListener with either a JDA object
or the JDABuilder.
Examples:
JDA jda = JDABuilder.createDefault("token").addEventListeners(listeners).build();
jda.addEventListener(listeners);
- See Also:
-
Method Summary
-
Method Details
-
onEvent
Handles anyGenericEvent.To get specific events with Methods like
onMessageReceived(MessageReceivedEvent event)take a look at:ListenerAdapter- Parameters:
event- The Event to handle.
-