Package net.dv8tion.jda.api.events
Class ShutdownEvent
- java.lang.Object
- 
- net.dv8tion.jda.api.events.Event
- 
- net.dv8tion.jda.api.events.ShutdownEvent
 
 
- 
- All Implemented Interfaces:
- GenericEvent
 
 public class ShutdownEvent extends Event Indicates that JDA has fully disconnected from Discord and will not attempt to reconnect again.
 At this stage all internal cache is invalid!
- 
- 
Constructor SummaryConstructors Constructor Description ShutdownEvent(JDA api, java.time.OffsetDateTime shutdownTime, int code)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description CloseCodegetCloseCode()Possibly-nullCloseCoderepresenting the meaning for this ShutdownEvent.intgetCode()The server close code that was in the disconnect close frame of this JDA instance.java.time.OffsetDateTimegetTimeShutdown()Time of WebSocket disconnect- 
Methods inherited from class net.dv8tion.jda.api.events.EventgetJDA, getResponseNumber
 
- 
 
- 
- 
- 
Constructor Detail- 
ShutdownEventpublic ShutdownEvent(@Nonnull JDA api, @Nonnull java.time.OffsetDateTime shutdownTime, int code)
 
- 
 - 
Method Detail- 
getTimeShutdown@Nonnull public java.time.OffsetDateTime getTimeShutdown() Time of WebSocket disconnect- Returns:
- OffsetDateTimerepresenting the point in time when the connection was dropped.
 
 - 
getCloseCode@Nullable public CloseCode getCloseCode() Possibly-nullCloseCoderepresenting the meaning for this ShutdownEvent.
 The raw close code can be retrieved fromgetCode()
 If this isnull, JDA does not know what the meaning for the connection loss was.- Returns:
- Possibly-null CloseCode
 
 - 
getCodepublic int getCode() The server close code that was in the disconnect close frame of this JDA instance.- Returns:
- int close code of the Server Close-Frame
 
 
- 
 
-