Class ThreadMembersUpdateEvent
java.lang.Object
discord4j.core.event.domain.Event
discord4j.core.event.domain.thread.ThreadEvent
discord4j.core.event.domain.thread.ThreadMembersUpdateEvent
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 Summary
ConstructorDescriptionThreadMembersUpdateEvent
(GatewayDiscordClient gateway, ShardInfo shardInfo, discord4j.discordjson.json.gateway.ThreadMembersUpdate dispatch, List<ThreadMember> members, List<ThreadMember> old) -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the approximate number of members in the thread, capped at 50.Returns the list of members who were added to the thread.getOld()
Returns the old list of members in the thread, if present.Returns a list of user IDs who were removed from the thread.toString()
Methods inherited from class discord4j.core.event.domain.Event
getClient, getShardInfo
-
Constructor Details
-
ThreadMembersUpdateEvent
public ThreadMembersUpdateEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, discord4j.discordjson.json.gateway.ThreadMembersUpdate dispatch, List<ThreadMember> members, @Nullable List<ThreadMember> old)
-
-
Method Details
-
getThreadId
-
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
Returns the list of members who were added to the thread.- Returns:
- a list of
ThreadMember
added to the thread
-
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
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
-