Class InteractionMemberImpl

java.lang.Object
com.mewna.catnip.entity.impl.interaction.InteractionMemberImpl
All Implemented Interfaces:
Entity, Member, InteractionMember, GuildEntity, HasGuild, HasJoinedAt, Mentionable, Permissable, Snowflake, Timestamped

public class InteractionMemberImpl extends Object implements InteractionMember
Since:
12/23/20.
Author:
amy
  • Constructor Details

    • InteractionMemberImpl

      public InteractionMemberImpl()
    • InteractionMemberImpl

      public InteractionMemberImpl(Member delegate, Set<Permission> permissions)
  • Method Details

    • 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.
    • nick

      @Nullable public String nick()
      Description copied from interface: Member
      The user's nickname in this guild.
      Specified by:
      nick in interface Member
      Returns:
      User's nickname. Null if not set.
    • roleIds

      @Nonnull public Set<String> roleIds()
      Description copied from interface: Member
      The ids of the user's roles in this guild.
      Specified by:
      roleIds in interface Member
      Returns:
      A Set of the ids of the user's roles.
    • joinedAt

      @Nullable public OffsetDateTime joinedAt()
      Description copied from interface: Member
      When the user joined the server last.
      Members who have joined, left, then rejoined will only have the most recent join exposed.
      This may be null under some conditions, ex. a member leaving a guild. In cases like this, catnip will attempt to load the old data from the cache if possible, but it may not work, hence nullability.
      Specified by:
      joinedAt in interface HasJoinedAt
      Specified by:
      joinedAt in interface Member
      Returns:
      The date and time the member joined the guild.
    • premiumSince

      @Nullable public OffsetDateTime premiumSince()
      Description copied from interface: Member
      When the user last used their Nitro Boost on this guild.
      Members who have un-boosted a guild then re-boosted it will only have the most recent boost exposed.
      This will be null if the user is not currently boosting the guild.
      Specified by:
      premiumSince in interface Member
      Returns:
      The date and time when the member boosted the guild.
    • 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.
    • 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.
    • avatarHash

      @Nullable public String avatarHash()
      Specified by:
      avatarHash in interface Member
      Returns:
      The hash of the user's per-guild avatar.
    • builder

    • delegate

      public Member delegate()
    • permissions

      public Set<Permission> permissions()
      Description copied from interface: Permissable
      Returns a list of the entity's permissions.
      Specified by:
      permissions in interface InteractionMember
      Specified by:
      permissions in interface Member
      Specified by:
      permissions in interface Permissable
      Returns:
      a list of the entity's permissions
    • delegate

      public InteractionMemberImpl delegate(Member delegate)
      Returns:
      this.
    • permissions

      public InteractionMemberImpl permissions(Set<Permission> permissions)
      Returns:
      this.