Package net.dv8tion.jda.api.events
Class Event
java.lang.Object
net.dv8tion.jda.api.events.Event
- All Implemented Interfaces:
GenericEvent
- Direct Known Subclasses:
DisconnectEvent,ExceptionEvent,GatewayPingEvent,GenericChannelEvent,GenericEmoteEvent,GenericGuildEvent,GenericInteractionCreateEvent,GenericMessageEvent,GenericRoleEvent,GenericSelfUpdateEvent,GenericThreadEvent,GenericUserEvent,GuildTimeoutEvent,HttpRequestEvent,MessageBulkDeleteEvent,RawGatewayEvent,ReadyEvent,ReconnectedEvent,ResumedEvent,ShutdownEvent,StatusChangeEvent,UnavailableGuildJoinedEvent,UnavailableGuildLeaveEvent
Top-level event type
All events JDA fires are derived from this class.
All events JDA fires are derived from this class.
Can be used to check if an Object is a JDA event in EventListener implementations to distinguish what event is being fired.
Adapter implementation: ListenerAdapter
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new Event from the given JDA instance
Uses the currentJDA.getResponseTotal()as sequenceCreates a new Event from the given JDA instance -
Method Summary
Modifier and TypeMethodDescriptiongetJDA()The current JDA instance corresponding to this EventlongThe current sequence for this event.
-
Constructor Details
-
Event
Creates a new Event from the given JDA instance- Parameters:
api- Current JDA instanceresponseNumber- The sequence number for this event- See Also:
-
Event
Creates a new Event from the given JDA instance
Uses the currentJDA.getResponseTotal()as sequence- Parameters:
api- Current JDA instance
-
-
Method Details
-
getJDA
Description copied from interface:GenericEventThe current JDA instance corresponding to this Event- Specified by:
getJDAin interfaceGenericEvent- Returns:
- The corresponding JDA instance
-
getResponseNumber
public long getResponseNumber()Description copied from interface:GenericEventThe current sequence for this event.
This can be used to keep events in order when making sequencing system.- Specified by:
getResponseNumberin interfaceGenericEvent- Returns:
- The current sequence number for this event
-