ClientOptions class
Optional client settings which can be used when creating new instance of client. It allows to tune up client to your needs.
Constructors
-
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.
Properties
- 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.
getter/setter pair
- compressedGatewayPayloads ↔ bool
-
Allows to receive compressed payloads from gateway
getter/setter pair
- dispatchRawShardEvent ↔ bool
-
Allows to enable receiving raw gateway event
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- httpRetryOptions ↔ RetryOptions
-
The RetryOptions to use when a HTTP request fails.
getter/setter pair
- initialPresence ↔ PresenceBuilder?
-
Initial bot presence
getter/setter pair
- largeThreshold ↔ int
-
Maximum size of guild for which offline member will be sent
getter/setter pair
- messageCacheSize ↔ int
-
The number of messages to cache for each channel.
getter/setter pair
- payloadCompression ↔ bool
-
Enable payload compression.
This cannot be used with the Encoding.etf encoding.
This will also be disabled if compressedGatewayPayloads is used.
getter/setter pair
- payloadEncoding ↔ Encoding
-
The encoding protocol to use when receiving/sending payloads.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
The total number of shards.
getter/setter pair
-
A list of shards to spawn on this instance of nyxx.
getter/setter pair
-
The RetryOptions to use when a shard fails to connect to the gateway.
getter/setter pair
- shutdownHook ↔ ShutdownHook?
-
Hook executed when disposing bots process.
getter/setter pair
- shutdownShardHook ↔ ShutdownShardHook?
-
Hook executed when shard is disposing.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited