Class DisconnectEvent

    • Method Detail

      • getCloseCode

        public CloseCode getCloseCode()
        Possibly-null CloseCode representing the meaning for this DisconnectEvent

        This is null if this disconnect did either not happen because the Service closed the session (see isClosedByServer()) or if there is no mapped CloseCode enum constant for the service close code!

        Possibly-null CloseCode
      • isClosedByServer

        public boolean isClosedByServer()
        Whether the connection was closed by discord
        True, if discord closed our connection
      • getTimeDisconnected

        public OffsetDateTime getTimeDisconnected()
        Time at which we noticed the disconnection
        Time of closure