Class MemberUpdateEvent


public class MemberUpdateEvent extends GuildEvent
Dispatched when a user's nickname or roles change in a guild.

This event is dispatched by Discord.

See Also:
  • Constructor Details

  • Method Details

    • getGuildId

      public Snowflake getGuildId()
      Gets the Snowflake ID of the Guild involved in the event.
      Returns:
      The ID of the Guild involved.
    • getGuild

      public Mono<Guild> getGuild()
      Requests to retrieve the Guild involved in the event.
      Returns:
      A Mono where, upon successful completion, emits the Guild involved. If an error is received, it is emitted through the Mono.
    • getMemberId

      public Snowflake getMemberId()
      Gets the Snowflake ID of the Member involved in the event.
      Returns:
      The ID of the Member involved.
    • getMember

      public Mono<Member> getMember()
      Requests to retrieve the Member involved in the event.
      Returns:
      A Mono where, upon successful completion, emits the Member that has been updated. If an error is received, it is emitted through the Mono.
    • getOld

      public Optional<Member> getOld()
      Gets the old version of the Member involved in the event, if present. This may not be available if Members are not stored.
      Returns:
      the old version of the Member involved, if present.
    • getCurrentRoleIds

      public Set<Snowflake> getCurrentRoleIds()
      Gets a list of Snowflake IDs of roles the Member is currently assigned.
      Returns:
      The IDs of the roles the Member is assigned.
    • getCurrentRoles

      public Flux<Role> getCurrentRoles()
      Requests to receive the list of Role roles that the Member is currently assigned.
      Returns:
      A Flux emitting the Role roles that the Member is assigned.
    • getCurrentNickname

      public Optional<String> getCurrentNickname()
      Gets the current nickname of the Member involved in this event, if present.
      Returns:
      The current nickname, if any, of the Member involved, if present.
    • getCurrentGuildAvatarUrl

      public Optional<String> getCurrentGuildAvatarUrl(Image.Format format)
      Gets the current member's guild avatar URL, if present.
      Parameters:
      format - the format for the URL.
      Returns:
      The current member's guild avatar URL, if present.
    • getCurrentGuildAvatar

      public Mono<Image> getCurrentGuildAvatar(Image.Format format)
      Gets the current member's guild avatar. This is the avatar at the url given by getCurrentGuildAvatarUrl(Image.Format).
      Parameters:
      format - The format for the avatar.
      Returns:
      a Mono where, upon successful completion, emits the current guild avatar of the member. If an error is received, it is emitted through the Mono.
    • getJoinTime

      public Optional<Instant> getJoinTime()
      Gets the current join time of the Member involved in this event, if present. It is typically absent if this event is caused by a lurking stage channel member.
      Returns:
      The current join time of the Member involved in this event, if present.
    • getCurrentPremiumSince

      public Optional<Instant> getCurrentPremiumSince()
      Gets when the user started boosting the guild, if present.
      Returns:
      When the user started boosting the guild, if present.
    • isCurrentPending

      public boolean isCurrentPending()
      Gets whether the user has currently not yet passed the guild's Membership Screening requirements.
      Returns:
      Whether the user has currently not yet passed the guild's Membership Screening requirements.
    • getCommunicationDisabledUntil

      public Optional<Instant> getCommunicationDisabledUntil()
      Gets when the user ends their timeout, if present.
      Returns:
      When the user ends their timeout in the server, if present.
    • toString

      public String toString()
      Overrides:
      toString in class Object