Class WebhookImpl

java.lang.Object
com.mewna.catnip.entity.impl.channel.WebhookImpl
All Implemented Interfaces:
Webhook, Entity, GuildEntity, HasChannel, HasGuild, HasNullableName, Snowflake, Timestamped, RequiresCatnip

public class WebhookImpl extends Object implements Webhook, RequiresCatnip
Since:
9/15/18
Author:
natanbc
  • Constructor Details

    • WebhookImpl

      public WebhookImpl()
    • WebhookImpl

      public WebhookImpl(Catnip catnip, long idAsLong, long guildIdAsLong, long channelIdAsLong, User user, String name, String avatar, String token)
  • 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 WebhookImpl.WebhookImplBuilder builder()
    • 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.
    • 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.
    • channelIdAsLong

      public long channelIdAsLong()
      Specified by:
      channelIdAsLong in interface HasChannel
    • user

      public User user()
      Specified by:
      user in interface Webhook
      Returns:
      The user that created this webhook.
    • name

      public String name()
      Specified by:
      name in interface HasNullableName
      Returns:
      The entity's name. May be null.
    • avatar

      public String avatar()
      Specified by:
      avatar in interface Webhook
      Returns:
      The default avatar of the webhook.
    • token

      public String token()
      Specified by:
      token in interface Webhook
      Returns:
      The secure token of the webhook.
    • idAsLong

      public WebhookImpl idAsLong(long idAsLong)
      Returns:
      this.
    • guildIdAsLong

      public WebhookImpl guildIdAsLong(long guildIdAsLong)
      Returns:
      this.
    • channelIdAsLong

      public WebhookImpl channelIdAsLong(long channelIdAsLong)
      Returns:
      this.
    • user

      public WebhookImpl user(User user)
      Returns:
      this.
    • name

      public WebhookImpl name(String name)
      Returns:
      this.
    • avatar

      public WebhookImpl avatar(String avatar)
      Returns:
      this.
    • token

      public WebhookImpl token(String token)
      Returns:
      this.