Enum VoiceGatewayOpcode

    • Enum Constant Detail

      • IDENTIFY

        public static final VoiceGatewayOpcode IDENTIFY
        begin a voice websocket connection.
      • SELECT_PROTOCOL

        public static final VoiceGatewayOpcode SELECT_PROTOCOL
        select the voice protocol.
      • HEARTBEAT

        public static final VoiceGatewayOpcode HEARTBEAT
        keep the websocket connection alive.
      • SESSION_DESCRIPTION

        public static final VoiceGatewayOpcode SESSION_DESCRIPTION
        describe the session.
      • SPEAKING

        public static final VoiceGatewayOpcode SPEAKING
        indicate which users are speaking.
      • HEARTBEAT_ACK

        public static final VoiceGatewayOpcode HEARTBEAT_ACK
        sent immediately following a received client heartbeat.
      • HELLO

        public static final VoiceGatewayOpcode HELLO
        the continuous interval in milliseconds after which the client should send a heartbeat.
      • CLIENT_DISCONNECT

        public static final VoiceGatewayOpcode CLIENT_DISCONNECT
        a client has disconnected from the voice channel.
    • Method Detail

      • values

        public static VoiceGatewayOpcode[] values​()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (VoiceGatewayOpcode c : VoiceGatewayOpcode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static VoiceGatewayOpcode valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • fromCode

        public static Optional<VoiceGatewayOpcode> fromCode​(int code)
        Gets the voice gateway opcode by actual numeric code.
        Parameters:
        code - The actual numeric code.
        Returns:
        The voice gateway opcode with the actual numeric code.
      • getCode

        public int getCode​()
        Gets the actual numeric code.
        Returns:
        The actual numeric code.