ClientOptions class Null safety

Optional client settings which can be used when creating new instance of client. It allows to tune up client to your needs.


ClientOptions({AllowedMentions? allowedMentions, int? shardCount, int messageCacheSize = 100, int largeThreshold = 50, bool compressedGatewayPayloads = true, PresenceBuilder? initialPresence, ShutdownHook? shutdownHook, ShutdownShardHook? shutdownShardHook, bool dispatchRawShardEvent = false, List<int>? shardIds, RetryOptions shardReconnectOptions = const RetryOptions(), RetryOptions httpRetryOptions = const RetryOptions(), Encoding payloadEncoding = Encoding.json, bool payloadCompression = false})
Makes a new ClientOptions object.


allowedMentions AllowedMentions?
Whether or not to disable @everyone and @here mentions at a global level. It means client won't send any of these. It doesn't mean filtering guild messages.
read / write
compressedGatewayPayloads bool
Allows to receive compressed payloads from gateway
read / write
dispatchRawShardEvent bool
Allows to enable receiving raw gateway event
read / write
hashCode int
The hash code for this object.
httpRetryOptions RetryOptions
The RetryOptions to use when a HTTP request fails.
read / write
initialPresence PresenceBuilder?
Initial bot presence
read / write
largeThreshold int
Maximum size of guild for which offline member will be sent
read / write
messageCacheSize int
The number of messages to cache for each channel.
read / write
payloadCompression bool
Enable payload compression. This cannot be used with the Encoding.etf encoding. This will also be disabled if compressedGatewayPayloads is used.
read / write
payloadEncoding Encoding
The encoding protocol to use when receiving/sending payloads.
read / write
runtimeType Type
A representation of the runtime type of the object.
shardCount int?
The total number of shards.
read / write
shardIds List<int>?
A list of shards to spawn on this instance of nyxx.
read / write
shardReconnectOptions RetryOptions
The RetryOptions to use when a shard fails to connect to the gateway.
read / write
shutdownHook ↔ ShutdownHook?
Hook executed when disposing bots process.
read / write
shutdownShardHook ↔ ShutdownShardHook?
Hook executed when shard is disposing.
read / write


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.