Class TemplateChannel

    • Method Detail

      • getIdLong

        public long getIdLong()
        The ids of channels are their position as stored by Discord so this will not look like a typical snowflake.
        Specified by:
        getIdLong in interface ISnowflake
        The id of the channel as stored by Discord
      • getName

        public String getName()
        The human readable name of the GuildChannel.
        If no name has been set, this returns null.
        The name of this GuildChannel
      • getTopic

        public String getTopic()
        The topic set for this TemplateChannel.
        If no topic has been set or the ChannelType is not TEXT, this returns null.
        Possibly-null String containing the topic of this TemplateChannel.
      • getPositionRaw

        public int getPositionRaw()
        The actual position of the TemplateChannel as stored and given by Discord. Channel positions are actually based on a pairing of the creation time (as stored in the snowflake id) and the position. If 2 or more channels share the same position then they are sorted based on their creation date. The more recent a channel was created, the lower it is in the hierarchy.
        The true, Discord stored, position of the TemplateChannel.
      • getParentId

        public long getParentId()
        Parent Category id of this TemplateChannel. Channels don't need to have a parent Category.
        Note that a Category channel will always return -1 for this method as nested categories are not supported.
        The id of the parent Category or -1 if the channel doesn't have a parent Category
      • isNSFW

        public boolean isNSFW()
        Whether or not this channel is considered as "NSFW" (Not-Safe-For-Work).
        If the ChannelType is not TEXT, this returns false.
        Whether this TextChannel is considered NSFW or false if the channel is not a text channel
      • getSlowmode

        public int getSlowmode()
        The slowmode set for this TemplateChannel.
        If slowmode is set this returns an int between 1 and TextChannel.MAX_SLOWMODE.
        If not set this returns 0.

        Note bots are unaffected by this.
        Having MESSAGE_MANAGE or MANAGE_CHANNEL permission also grants immunity to slowmode.

        The slowmode for this TextChannel, between 1 and TextChannel.MAX_SLOWMODE, 0 if no slowmode is set.
      • getBitrate

        public int getBitrate()
        The audio bitrate of the voice audio that is transmitted in this channel. While higher bitrates can be sent to this channel, it will be scaled down by the client.
        Default and recommended value is 64000
        The audio bitrate of this voice channel
      • getUserLimit

        public int getUserLimit()
        The maximum amount of Members that can be in this voice channel at once.
        0 - No limit
        The maximum amount of members allowed in this channel at once.
      • isNews

        public boolean isNews()
        Whether or not this channel is considered an Announcement-/News-Channel.
        These channels can be used to crosspost messages to other guilds by using a follower type webhook.
        True, if this is considered a news channel