Interface Member

    • Method Detail

      • getUser

        User getUser()
        The user wrapped by this Entity.
        Returns:
        User
      • getJDA

        JDA getJDA()
        The JDA instance.
        Returns:
        The current JDA instance.
      • getJoinDate

        java.time.OffsetDateTime getJoinDate()
        The Time this Member joined the Guild.
        Returns:
        The Join Date.
      • getGame

        Game getGame()
        The game that the user is currently playing.
        If the user is not currently playing a game, this will return null.
        Returns:
        Possibly-null Game containing the game that the User is currently playing.
      • getNickname

        java.lang.String getNickname()
        Returns the current nickname of this Member for the parent Guild.

        This can be changed using GuildController.setNickname(Member, String).

        Returns:
        The nickname or null, if no nickname is set.
      • getEffectiveName

        java.lang.String getEffectiveName()
        Retrieves the Name displayed in the official Discord Client.
        Returns:
        The Nickname of this Member or the Username if no Nickname is present.
      • getRoles

        java.util.List<Role> getRoles()
        The roles applied to this Member.
        The roles are ordered based on their position.

        A Member's roles can be changed using the addRolesToMember, removeRolesFromMember, and modifyMemberRoles methods in GuildController.

        The Public Role (@everyone) is not included in the returned immutable list of roles
        It is implicit that every member holds the Public Role in a Guild thus it is not listed here!

        Returns:
        An immutable List of Roles for this Member.
      • getColor

        java.awt.Color getColor()
        The Color of this Member's name in a Guild.

        This is determined by the color of the highest role assigned to them that does not have the default color.
        If all roles have default color, this returns null.

        Returns:
        The display Color for this Member.
        See Also:
        getColorRaw()
      • getColorRaw

        int getColorRaw()
        The raw RGB value for the color of this member.
        Defaulting to Role.DEFAULT_COLOR_RAW if this member uses the default color (special property, it changes depending on theme used in the client)
        Returns:
        The raw RGB value or the role default
      • canInteract

        boolean canInteract​(Member member)
        Whether this Member can interact with the provided Member (kick/ban/etc.)
        Parameters:
        member - The target Member to check
        Returns:
        True, if this Member is able to interact with the specified Member
        Throws:
        java.lang.NullPointerException - if the specified Member is null
        java.lang.IllegalArgumentException - if the specified Member is not from the same guild
        See Also:
        PermissionUtil.canInteract(Member, Member)
      • canInteract

        boolean canInteract​(Role role)
        Whether this Member can interact with the provided Role (kick/ban/move/modify/delete/etc.)
        Parameters:
        role - The target Role to check
        Returns:
        True, if this member is able to interact with the specified Role
        Throws:
        java.lang.NullPointerException - if the specified Role is null
        java.lang.IllegalArgumentException - if the specified Role is not from the same guild
        See Also:
        PermissionUtil.canInteract(Member, Role)
      • canInteract

        boolean canInteract​(Emote emote)
        Whether this Member can interact with the provided Emote (use in a message)
        Parameters:
        emote - The target Emote to check
        Returns:
        True, if this Member is able to interact with the specified Emote
        Throws:
        java.lang.NullPointerException - if the specified Emote is null
        java.lang.IllegalArgumentException - if the specified Emote is not from the same guild
        See Also:
        PermissionUtil.canInteract(Member, Emote)
      • isOwner

        boolean isOwner()
        Checks whether this member is the owner of its related Guild.
        Returns:
        True, if this member is the owner of the attached Guild.
      • getDefaultChannel

        @Nullable
        TextChannel getDefaultChannel()
        The default TextChannel for a Member.
        This is the channel that the Discord client will default to opening when a Guild is opened for the first time after joining the guild.
        The default channel is the channel with the highest position in which the member has Permission.MESSAGE_READ permissions. If this requirement doesn't apply for any channel in the guild, this method returns null.
        Returns:
        The TextChannel representing the default channel for this member or null if no such channel exists.