Enum ChannelType

    • Enum Constant Detail

      • SERVER_TEXT_CHANNEL

        public static final ChannelType SERVER_TEXT_CHANNEL
      • PRIVATE_CHANNEL

        public static final ChannelType PRIVATE_CHANNEL
      • SERVER_VOICE_CHANNEL

        public static final ChannelType SERVER_VOICE_CHANNEL
      • GROUP_CHANNEL

        public static final ChannelType GROUP_CHANNEL
      • CHANNEL_CATEGORY

        public static final ChannelType CHANNEL_CATEGORY
      • SERVER_NEWS_CHANNEL

        public static final ChannelType SERVER_NEWS_CHANNEL
      • SERVER_STORE_CHANNEL

        public static final ChannelType SERVER_STORE_CHANNEL
    • Method Detail

      • values

        public static ChannelType[] 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 (ChannelType c : ChannelType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ChannelType 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
      • getId

        public int getId​()
        Gets the id of the channel type.
        Returns:
        The id of the channel type.
      • isTextChannelType

        public boolean isTextChannelType​()
        Checks if this type is a text channel type.
        Returns:
        Whether this type is a text channel type or not.
      • isVoiceChannelType

        public boolean isVoiceChannelType​()
        Checks if this type is a voice channel type.
        Returns:
        Whether this type is a voice channel type or not.
      • isServerChannelType

        public boolean isServerChannelType​()
        Checks if this type is a server channel type.
        Returns:
        Whether this type is a server channel type or not.
      • fromId

        public static ChannelType fromId​(int id)
        Gets a channel type by its id.
        Parameters:
        id - The id of the channel type.
        Returns:
        The channel type with the given id.
      • getTextChannelTypes

        public static ChannelType[] getTextChannelTypes​()
        Gets an array with all types that are text channel types.
        Returns:
        All types that are text channel types.
      • getVoiceChannelTypes

        public static ChannelType[] getVoiceChannelTypes​()
        Gets an array with all type that are voice channel types.
        Returns:
        All types that are voice channel types.
      • getServerChannelTypes

        public static ChannelType[] getServerChannelTypes​()
        Gets an array with all types that are server channel types.
        Returns:
        All types that are server channel types.