Class NewsChannelImpl

java.lang.Object
com.mewna.catnip.entity.impl.channel.NewsChannelImpl
All Implemented Interfaces:
Channel, GuildChannel, MessageChannel, NewsChannel, TextChannel, Entity, GuildEntity, HasGuild, HasName, HasParentChannel, Mentionable, Snowflake, Timestamped, RequiresCatnip

public class NewsChannelImpl extends Object implements NewsChannel, RequiresCatnip
TODO: Should this just extend TextChannelImpl instead?
Since:
3/10/19.
Author:
amy
  • Constructor Details

    • NewsChannelImpl

      public NewsChannelImpl()
    • NewsChannelImpl

      public NewsChannelImpl(Catnip catnip, long idAsLong, String name, long guildIdAsLong, int position, long parentIdAsLong, List<PermissionOverride> overrides, String topic, boolean nsfw)
  • Method Details

    • catnip

      public void catnip(@Nonnull Catnip catnip)
      Specified by:
      catnip in interface RequiresCatnip
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • builder

      public static NewsChannelImpl.NewsChannelImplBuilder builder()
    • type

      public Channel.ChannelType type()
      Specified by:
      type in interface Channel
      Returns:
      The type of this channel.
    • catnip

      public Catnip catnip()
      Description copied from interface: Entity
      Returns the catnip instance associated with this entity.
      Specified by:
      catnip in interface Entity
      Returns:
      The catnip instance of this entity.
    • idAsLong

      public long idAsLong()
      Description copied from interface: Snowflake
      The ID of this snowflake, as a long.
      Specified by:
      idAsLong in interface Snowflake
      Returns:
      Long representing the ID.
    • name

      public String name()
      Specified by:
      name in interface HasName
    • guildIdAsLong

      public long guildIdAsLong()
      Description copied from interface: HasGuild
      The id of the guild this entity is from.
      Specified by:
      guildIdAsLong in interface HasGuild
      Returns:
      Long representing the guild ID.
    • position

      public int position()
      Specified by:
      position in interface GuildChannel
      Returns:
      The position of the channel.
    • parentIdAsLong

      public long parentIdAsLong()
      Specified by:
      parentIdAsLong in interface HasParentChannel
      Returns:
      The id of the Category that is the parent of this channel. A value of 0 means no parent.
    • overrides

      public List<PermissionOverride> overrides()
      Specified by:
      overrides in interface GuildChannel
      Returns:
      The permission overrides set on this channel. Will never be null, but may be empty.
    • topic

      public String topic()
      Description copied from interface: TextChannel
      The channel's topic. Shown at the top of the channel. May be null.
      Specified by:
      topic in interface TextChannel
      Returns:
      The channel's topic.
    • nsfw

      public boolean nsfw()
      Specified by:
      nsfw in interface TextChannel
      Returns:
      Whether or not this channel has been marked as nsfw.
    • idAsLong

      public NewsChannelImpl idAsLong(long idAsLong)
      Returns:
      this.
    • name

      public NewsChannelImpl name(String name)
      Returns:
      this.
    • guildIdAsLong

      public NewsChannelImpl guildIdAsLong(long guildIdAsLong)
      Returns:
      this.
    • position

      public NewsChannelImpl position(int position)
      Returns:
      this.
    • parentIdAsLong

      public NewsChannelImpl parentIdAsLong(long parentIdAsLong)
      Returns:
      this.
    • overrides

      public NewsChannelImpl overrides(List<PermissionOverride> overrides)
      Returns:
      this.
    • topic

      public NewsChannelImpl topic(String topic)
      Returns:
      this.
    • nsfw

      public NewsChannelImpl nsfw(boolean nsfw)
      Returns:
      this.