public class ShutdownEvent extends Event
Constructor and Description |
---|
ShutdownEvent(JDA api,
java.time.OffsetDateTime shutdownTime,
int code) |
Modifier and Type | Method and Description |
---|---|
CloseCode |
getCloseCode()
Possibly-null
CloseCode
representing the meaning for this ShutdownEvent. |
int |
getCode()
The server close code that was in the disconnect close frame
of this JDA instance.
|
java.time.OffsetDateTime |
getShutdownTime()
Time of WebSocket disconnect
|
getJDA, getResponseNumber
public ShutdownEvent(JDA api, java.time.OffsetDateTime shutdownTime, int code)
public java.time.OffsetDateTime getShutdownTime()
OffsetDateTime
representing
the point in time when the connection was dropped.public CloseCode getCloseCode()
CloseCode
representing the meaning for this ShutdownEvent.
getCode()
null
, JDA does not know what the meaning for the connection loss was.CloseCode
public int getCode()