Class MemberChunkEvent
- java.lang.Object
-
- discord4j.core.event.domain.Event
-
- discord4j.core.event.domain.guild.GuildEvent
-
- discord4j.core.event.domain.guild.MemberChunkEvent
-
public class MemberChunkEvent extends GuildEvent
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 yourIntent
configuration atGatewayBootstrap.setEnabledIntents(IntentSet)
.This event is dispatched by Discord.
- See Also:
- Guild Members Chunk
-
-
Constructor Summary
Constructors Constructor Description MemberChunkEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, long guildId, Set<Member> members, int chunkIndex, int chunkCount, List<Snowflake> notFound, String nonce)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getChunkCount()
Gets the total number of expected chunks for this response.int
getChunkIndex()
Gets the chunk index in the expected chunks for this response (0 <= chunk_index < chunk_count).Mono<Guild>
getGuild()
Requests to retrieve theGuild
involved in the event.Snowflake
getGuildId()
Set<Member>
getMembers()
Gets a list ofMembers
that have been streamed to the client in this event.Optional<String>
getNonce()
Gets the nonce used in the Guild Members Request, if present.List<Snowflake>
getNotFound()
Gets invalid id passed to `REQUEST_GUILD_MEMBERS`, if any.String
toString()
-
Methods inherited from class discord4j.core.event.domain.Event
getClient, getShardInfo
-
-
-
-
Method Detail
-
getMembers
public Set<Member> 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
public List<Snowflake> getNotFound()
Gets invalid id passed to `REQUEST_GUILD_MEMBERS`, if any.- Returns:
- Gets invalid id passed to `REQUEST_GUILD_MEMBERS`, if any.
-
getNonce
public Optional<String> getNonce()
Gets the nonce used in the Guild Members Request, if present.- Returns:
- The nonce used in the Guild Members Request, if present.
-
-