Class IdentifyOptions.Builder

    • Constructor Detail

      • Builder

        protected Builder​(ShardInfo shardInfo)
        Create a builder using the given shard information.
        Parameters:
        shardInfo - the shard index and count to be used when authenticating
    • Method Detail

      • initialStatus

        public IdentifyOptions.Builder initialStatus​(@Nullable
                                                     discord4j.discordjson.json.gateway.StatusUpdate initialStatus)
        Set the initial presence status the bot will identify with.
        Parameters:
        initialStatus - a StatusUpdate to be used when authenticating
        Returns:
        this builder
      • largeThreshold

        public IdentifyOptions.Builder largeThreshold​(int largeThreshold)
        Set the number of members a guild must have to be considered "large". Defaults to 250.
        Parameters:
        largeThreshold - the number of guild members to identify a large guild
        Returns:
        this builder
      • resumeSession

        public IdentifyOptions.Builder resumeSession​(@Nullable
                                                     SessionInfo resumeSession)
        Set information about a Gateway session to be resumed. If not specified, a normal authentication is performed, creating a fresh session to the Gateway.
        Parameters:
        resumeSession - a SessionInfo for resumption, or null if not using this capability
        Returns:
        this builder