Class MemberChunkEvent
java.lang.Object
discord4j.core.event.domain.Event
discord4j.core.event.domain.guild.GuildEvent
discord4j.core.event.domain.guild.MemberChunkEvent
Dispatched as members are streamed to the client from Discord.
By default, all members in large connected guilds are requested on startup, but this behavior can be configured using
GatewayBootstrap.setMemberRequestFilter(MemberRequestFilter)
and ultimately depending on your Intent
configuration at GatewayBootstrap.setEnabledIntents(IntentSet)
.
This event is dispatched by Discord.
- See Also:
-
Constructor Summary
ConstructorDescriptionMemberChunkEvent
(GatewayDiscordClient gateway, ShardInfo shardInfo, long guildId, Set<Member> members, int chunkIndex, int chunkCount, List<Snowflake> notFound, String nonce) -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the total number of expected chunks for this response.int
Gets the chunk index in the expected chunks for this response (0 <= chunk_index < chunk_count).getGuild()
Requests to retrieve theGuild
involved in the event.Gets a list ofMembers
that have been streamed to the client in this event.getNonce()
Gets the nonce used in the Guild Members Request, if present.Gets invalid id passed to `REQUEST_GUILD_MEMBERS`, if any.toString()
Methods inherited from class discord4j.core.event.domain.Event
getClient, getShardInfo
-
Constructor Details
-
MemberChunkEvent
-
-
Method Details
-
getGuildId
- Returns:
- The ID of the
Guild
.
-
getGuild
Requests to retrieve theGuild
involved in the event. -
getMembers
Gets a list ofMembers
that have been streamed to the client in this event. This may not contain allMembers
of theGuild
.- Returns:
- The list of
Members
streamed to the client in this event.
-
getChunkIndex
public int getChunkIndex()Gets the chunk index in the expected chunks for this response (0 <= chunk_index < chunk_count).- Returns:
- The chunk index in the expected chunks for this response (0 <= chunk_index < chunk_count).
-
getChunkCount
public int getChunkCount()Gets the total number of expected chunks for this response.- Returns:
- The total number of expected chunks for this response.
-
getNotFound
Gets invalid id passed to `REQUEST_GUILD_MEMBERS`, if any.- Returns:
- Gets invalid id passed to `REQUEST_GUILD_MEMBERS`, if any.
-
getNonce
Gets the nonce used in the Guild Members Request, if present.- Returns:
- The nonce used in the Guild Members Request, if present.
-
toString
-