public static class IdentifyOptions.Builder extends Object
IdentifyOptions. Requires specifying the shard information.| Modifier | Constructor and Description |
|---|---|
protected |
Builder(ShardInfo shardInfo)
Create a builder using the given shard information.
|
| Modifier and Type | Method and Description |
|---|---|
IdentifyOptions |
build()
Construct the authentication policy.
|
IdentifyOptions.Builder |
guildSubscriptions(Boolean guildSubscriptions)
Set whether to enable presence and typing events while identifying.
|
IdentifyOptions.Builder |
initialStatus(discord4j.discordjson.json.gateway.StatusUpdate initialStatus)
Set the initial presence status the bot will identify with.
|
IdentifyOptions.Builder |
intents(IntentSet intents)
Set the Gateway intents to use when authenticating.
|
IdentifyOptions.Builder |
largeThreshold(int largeThreshold)
Set the number of members a guild must have to be considered "large".
|
IdentifyOptions.Builder |
resumeSession(SessionInfo resumeSession)
Set information about a Gateway session to be resumed.
|
protected Builder(ShardInfo shardInfo)
shardInfo - the shard index and count to be used when authenticatingpublic IdentifyOptions.Builder initialStatus(@Nullable discord4j.discordjson.json.gateway.StatusUpdate initialStatus)
initialStatus - a StatusUpdate to be used when authenticatingpublic IdentifyOptions.Builder intents(@Nullable IntentSet intents)
intents - an IntentSet for authenticating, or null if not using this capabilitypublic IdentifyOptions.Builder guildSubscriptions(@Nullable Boolean guildSubscriptions)
guildSubscriptions - true if enabling this feature, false to disable it, or null if this attribute should be ignored when authenticatingpublic IdentifyOptions.Builder largeThreshold(int largeThreshold)
largeThreshold - the number of guild members to identify a large guildpublic IdentifyOptions.Builder resumeSession(@Nullable SessionInfo resumeSession)
resumeSession - a SessionInfo for resumption, or null if not using this capabilitypublic IdentifyOptions build()
IdentifyOptions