Class ResolvedMember

    • Constructor Detail

      • ResolvedMember

        public ResolvedMember​(GatewayDiscordClient gateway,
                              discord4j.discordjson.json.ResolvedMemberData data,
                              discord4j.discordjson.json.UserData user,
                              long guildId)
        Constructs a ResolvedMember with an associated GatewayDiscordClient and Discord data.
        Parameters:
        gateway - The GatewayDiscordClient associated to this object, must be non-null.
        data - The raw data as represented by Discord, must be non-null.
        user - The raw user associated to the member, must be non-null.
        guildId - the ID of the guild the user is member of
    • Method Detail

      • getData

        public discord4j.discordjson.json.ResolvedMemberData getData()
        Returns the raw data as represented by Discord.
        Returns:
        the raw data
      • getId

        public Snowflake getId()
        Gets the ID of this member.
        Returns:
        The ID of this member;
      • getGuildId

        public Snowflake getGuildId()
        Gets the ID of the guild this user is associated to.
        Returns:
        The ID of the guild this user is associated to.
      • getRoleIds

        public Set<Snowflake> getRoleIds()
        Gets the user's guild roles' IDs.
        Returns:
        The user's guild roles' IDs.
      • getJoinTime

        public Instant getJoinTime()
        Gets when the user joined the guild.
        Returns:
        When the user joined the guild.
      • getPremiumTime

        public Optional<Instant> getPremiumTime()
        Gets when the user started boosting the server, if present.
        Returns:
        When the user started boosting the server, if present.
      • getDisplayName

        public String getDisplayName()
        Gets the name that is displayed in client.
        Returns:
        The name that is displayed in client.
      • getNickname

        public Optional<String> getNickname()
        Gets the user's guild nickname (if one is set).
        Returns:
        The user's guild nickname (if one is set).
      • getNicknameMention

        public String getNicknameMention()
        Gets the raw nickname mention. This is the format utilized to directly mention another user (assuming the user exists in context of the mention).
        Returns:
        The raw nickname mention.
      • getEffectivePermissions

        public PermissionSet getEffectivePermissions()
        Gets the total permissions of the member in the channel, including overwrites.
        Returns:
        The permissions of the member.
      • asFullMember

        public Mono<Member> asFullMember()
        Retrieves the full Member instance corresponding to this resolved member.
        Returns:
        a Mono where, upon successful completion, emits the full Member instance corresponding to this resolved member. If an error is received, it is emitted through the Mono.
      • asFullMember

        public Mono<Member> asFullMember​(EntityRetrievalStrategy retrievalStrategy)
        Retrieves the full Member instance corresponding to this resolved member, using the given retrieval strategy.
        Returns:
        a Mono where, upon successful completion, emits the full Member instance corresponding to this resolved member. If an error is received, it is emitted through the Mono.