public class IdentifyOptions extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
IdentifyOptions.Builder
Builder to create
IdentifyOptions. |
| Modifier | Constructor and Description |
|---|---|
protected |
IdentifyOptions(IdentifyOptions.Builder builder)
Create a new Gateway authentication policy.
|
| Modifier and Type | Method and Description |
|---|---|
static IdentifyOptions.Builder |
builder(int shardIndex,
int shardCount)
Create a builder to create an
IdentifyOptions using the given shard information. |
static IdentifyOptions.Builder |
builder(ShardInfo shardInfo)
Create a builder to create an
IdentifyOptions using the given shard information. |
static IdentifyOptions |
create(int shardIndex,
int shardCount)
Create a default
IdentifyOptions using the given shard index and count. |
static IdentifyOptions |
create(ShardInfo shardInfo)
Create a default
IdentifyOptions using the given shard information. |
Optional<Boolean> |
getGuildSubscriptions()
Retrieve whether to enable presence and typing events when identifying.
|
Optional<discord4j.discordjson.json.gateway.StatusUpdate> |
getInitialStatus()
Retrieve the initial status used to identify bots.
|
Optional<IntentSet> |
getIntents()
Retrieve the intents which should be subscribed from the gateway when identifying.
|
int |
getLargeThreshold()
Retrieve the number of members used to determine if a guild is "large".
|
Optional<SessionInfo> |
getResumeSession()
Retrieve the
SessionInfo that should be used to resume a Gateway session. |
ShardInfo |
getShardInfo()
Retrieve the
ShardInfo to be used when authenticating, specifying shard index and count. |
IdentifyOptions.Builder |
mutate()
Derive a
IdentifyOptions.Builder from this object, reusing all properties. |
IdentifyOptions.Builder |
mutate(ShardInfo shardInfo)
Derive a
IdentifyOptions.Builder from this object, targeting a different ShardInfo but reusing all other
properties. |
String |
toString() |
protected IdentifyOptions(IdentifyOptions.Builder builder)
builder - a builder used to configure this objectpublic static IdentifyOptions create(int shardIndex, int shardCount)
IdentifyOptions using the given shard index and count.shardIndex - the shard index for authenticationshardCount - the shard count for authenticationpublic static IdentifyOptions create(ShardInfo shardInfo)
IdentifyOptions using the given shard information.shardInfo - the shard index and count to be used when authenticatingpublic static IdentifyOptions.Builder builder(int shardIndex, int shardCount)
IdentifyOptions using the given shard information.shardIndex - the shard index for authenticationshardCount - the shard count for authenticationIdentifyOptions.Builderpublic static IdentifyOptions.Builder builder(ShardInfo shardInfo)
IdentifyOptions using the given shard information.shardInfo - the shard index and count to be used when authenticatingIdentifyOptions.Builderpublic IdentifyOptions.Builder mutate()
IdentifyOptions.Builder from this object, reusing all properties.IdentifyOptions.Builder for further configurationpublic IdentifyOptions.Builder mutate(ShardInfo shardInfo)
IdentifyOptions.Builder from this object, targeting a different ShardInfo but reusing all other
properties.shardInfo - the shard information for authentication to be used in the builderIdentifyOptions.Builder for further configurationpublic ShardInfo getShardInfo()
ShardInfo to be used when authenticating, specifying shard index and count.public Optional<discord4j.discordjson.json.gateway.StatusUpdate> getInitialStatus()
public Optional<IntentSet> getIntents()
Possible.absent() when no intents are set or the raw intent value which should be subscribedpublic Optional<Boolean> getGuildSubscriptions()
true if guild subscriptions should be enabled, false otherwisepublic int getLargeThreshold()
public Optional<SessionInfo> getResumeSession()
SessionInfo that should be used to resume a Gateway session.