Class ThreadMembersUpdateEvent


public class ThreadMembersUpdateEvent extends ThreadEvent
Sent when anyone is added to or removed from a thread. If the current user does not have the Intent.GUILD_MEMBERS Gateway Intent, then this event will only be sent if the current user was added to or removed from the thread.
See Also:
  • Constructor Details

  • Method Details

    • getThreadId

      public Snowflake getThreadId()
    • getGuildId

      public Snowflake getGuildId()
    • getMemberCount

      public int getMemberCount()
      Returns the approximate number of members in the thread, capped at 50.
      Returns:
      the approximate number of members in the thread
    • getMembers

      public List<ThreadMember> getMembers()
      Returns the list of members who were added to the thread.
      Returns:
      a list of ThreadMember added to the thread
    • getOld

      public Optional<List<ThreadMember>> getOld()
      Returns the old list of members in the thread, if present.
      Returns:
      a list of ThreadMember in the thread before the event, if present
    • getRemovedMemberIds

      public List<Snowflake> getRemovedMemberIds()
      Returns a list of user IDs who were removed from the thread.
      Returns:
      a list of Snowflake user IDs who were removed from the thread
    • toString

      public String toString()
      Overrides:
      toString in class Object