Class 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 your Intent configuration at GatewayBootstrap.setEnabledIntents(IntentSet).

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 this event.
      Returns:
      The ID of the Guild.
    • 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 in the event. If an error is received, it is emitted through the Mono.
    • getMembers

      public Set<Member> getMembers()
      Gets a list of Members that have been streamed to the client in this event. This may not contain all Members of the Guild.
      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.
    • toString

      public String toString()
      Overrides:
      toString in class Object