Package net.dv8tion.jda.api.events
Class RawGatewayEvent
java.lang.Object
net.dv8tion.jda.api.events.Event
net.dv8tion.jda.api.events.RawGatewayEvent
- All Implemented Interfaces:
GenericEvent
Wrapper for the raw dispatch event received from discord.
This provides the raw structure of a gateway event through a
This provides the raw structure of a gateway event through a
DataObject
instance containing:
- d: The payload of the package (DataObject)
- t: The type of the package (String)
- op: The opcode of the package, always 0 for dispatch (int)
- s: The sequence number, equivalent to
Event.getResponseNumber()
(long)
Sent after derived events. This is disabled by default and can be enabled through either
the JDABuilder
or DefaultShardManagerBuilder
.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe raw gateway package including sequence and type.The payload of the package.getType()
The type of event.Methods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getResponseNumber
-
Constructor Details
-
RawGatewayEvent
-
-
Method Details
-
getPackage
The raw gateway package including sequence and type.- d: The payload of the package (DataObject)
- t: The type of the package (String)
- op: The opcode of the package, always 0 for dispatch (int)
- s: The sequence number, equivalent to
Event.getResponseNumber()
(long)
- Returns:
- The data object
-
getPayload
The payload of the package.- Returns:
- The payload as a
DataObject
instance
-
getType
The type of event.- Returns:
- The type of event.
-