Package discord4j.gateway
Class IdentifyOptions.Builder
java.lang.Object
discord4j.gateway.IdentifyOptions.Builder
- Enclosing class:
- IdentifyOptions
Builder to create
IdentifyOptions. Requires specifying the shard information.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Construct the authentication policy.initialStatus(discord4j.discordjson.json.gateway.StatusUpdate initialStatus) Set the initial presence status the bot will identify with.Set the Gateway intents to use when authenticating.largeThreshold(int largeThreshold) Set the number of members a guild must have to be considered "large".resumeSession(SessionInfo resumeSession) Set information about a Gateway session to be resumed.
-
Constructor Details
-
Builder
Create a builder using the given shard information.- Parameters:
shardInfo- the shard index and count to be used when authenticating
-
-
Method Details
-
initialStatus
public IdentifyOptions.Builder initialStatus(@Nullable discord4j.discordjson.json.gateway.StatusUpdate initialStatus) Set the initial presence status the bot will identify with.- Parameters:
initialStatus- aStatusUpdateto be used when authenticating- Returns:
- this builder
-
intents
Set the Gateway intents to use when authenticating.- Parameters:
intents- anIntentSetfor authenticating, ornullif not using this capability- Returns:
- this builder
-
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
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- aSessionInfofor resumption, ornullif not using this capability- Returns:
- this builder
-
build
Construct the authentication policy.- Returns:
- a built
IdentifyOptions
-