Class ApplicationOwnerImpl

java.lang.Object
com.mewna.catnip.entity.impl.misc.ApplicationOwnerImpl
All Implemented Interfaces:
Entity, ApplicationOwner, Mentionable, Snowflake, Timestamped, RequiresCatnip, User

public class ApplicationOwnerImpl extends Object implements ApplicationOwner, RequiresCatnip
  • Constructor Details

    • ApplicationOwnerImpl

      public ApplicationOwnerImpl()
    • ApplicationOwnerImpl

      public ApplicationOwnerImpl(Catnip catnip, long idAsLong, String username, String discriminator, String avatar, boolean bot)
  • Method Details

    • isTeam

      public boolean isTeam()
      Specified by:
      isTeam in interface ApplicationOwner
    • catnip

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

      @CheckReturnValue public boolean animatedAvatar()
      Description copied from interface: User
      Whether the user's avatar is animated.
      Specified by:
      animatedAvatar in interface User
      Returns:
      True if the avatar is animated, false otherwise.
    • defaultAvatarUrl

      @Nonnull @CheckReturnValue public String defaultAvatarUrl()
      Description copied from interface: User
      The URL for the default avatar for this user.
      Specified by:
      defaultAvatarUrl in interface User
      Returns:
      String containing the URL to the default avatar. Never null.
    • avatarUrl

      @Nullable @CheckReturnValue public String avatarUrl(@Nonnull ImageOptions options)
      Description copied from interface: User
      The URL for the user's set avatar. Can be null if the user has not set an avatar.
      Specified by:
      avatarUrl in interface User
      Parameters:
      options - Image Options.
      Returns:
      String containing the URL to their avatar, options considered. Can be null.
      See Also:
    • avatarUrl

      @Nullable @CheckReturnValue public String avatarUrl()
      Description copied from interface: User
      The URL for the user's set avatar. Can be null if the user has not set an avatar.
      Specified by:
      avatarUrl in interface User
      Returns:
      String containing the URL to their avatar. Can be null.
      See Also:
    • effectiveAvatarUrl

      @Nonnull @CheckReturnValue public String effectiveAvatarUrl(@Nonnull ImageOptions options)
      Description copied from interface: User
      The URL for the user's effective avatar, as displayed in the Discord client.
      Convenience method for getting the user's default avatar when User.avatarUrl() is null.
      Specified by:
      effectiveAvatarUrl in interface User
      Parameters:
      options - Image Options.
      Returns:
      String containing a URL to their effective avatar, options considered. Never null.
    • effectiveAvatarUrl

      @Nonnull @CheckReturnValue public String effectiveAvatarUrl()
      Description copied from interface: User
      The URL for the user's effective avatar, as displayed in the Discord client.
      Convenience method for getting the user's default avatar when User.avatarUrl() is null.
      Specified by:
      effectiveAvatarUrl in interface User
      Returns:
      String containing a URL to their effective avatar. Never null.
    • publicFlags

      @Nonnull public Set<UserFlag> publicFlags()
      Description copied from interface: User
      The public flags on a user's account. Public flags are a currently-undocumented subset of all user flags.
      Specified by:
      publicFlags in interface User
      Returns:
      The public flags on a user's account.
    • 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
    • banner

      @Nullable public String banner()
      Specified by:
      banner in interface User
      Returns:
      The hash of the user's banner if it exists
    • accentColor

      public int accentColor()
      Specified by:
      accentColor in interface User
      Returns:
      The user's profile accent colour.
    • 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.
    • username

      public String username()
      Description copied from interface: User
      The username of the user.
      Specified by:
      username in interface User
      Returns:
      User's name. Never null.
    • discriminator

      public String discriminator()
      Description copied from interface: User
      Discriminator of the user, used to tell Amy#0001 from Amy#0002.
      Specified by:
      discriminator in interface User
      Returns:
      4 digit discriminator as a string. Never null.
    • avatar

      public String avatar()
      Description copied from interface: User
      User's avatar hash.
      This does not return their avatar URL nor image directly.
      Specified by:
      avatar in interface User
      Returns:
      User's hashed avatar string. Can be null.
      See Also:
    • bot

      public boolean bot()
      Description copied from interface: User
      Whether the user is a bot, or webhook/fake user.
      Specified by:
      bot in interface User
      Returns:
      True if the user is a bot, false if the user is a human.
    • idAsLong

      public ApplicationOwnerImpl idAsLong(long idAsLong)
      Returns:
      this.
    • username

      public ApplicationOwnerImpl username(String username)
      Returns:
      this.
    • discriminator

      public ApplicationOwnerImpl discriminator(String discriminator)
      Returns:
      this.
    • avatar

      public ApplicationOwnerImpl avatar(String avatar)
      Returns:
      this.
    • bot

      public ApplicationOwnerImpl bot(boolean bot)
      Returns:
      this.