IShardManager class abstract

Spawns, connects, monitors, manages and terminates shards. Sharding will be automatic if no user settings are supplied in ClientOptions when instantiating Nyxx client instance.

Discord gateways implement a method of user-controlled guild sharding which allows for splitting events across a number of gateway connections. Guild sharding is entirely user controlled, and requires no state-sharing between separate connections to operate.

Implemented types

Constructors

IShardManager()

Properties

gatewayLatency Duration
Average gateway latency across all shards
no setter
hashCode int
The hash code for this object.
no setterinherited
maxConcurrency int
The number of identify requests allowed per 5 seconds
no setter
numShards int
Number of shards spawned
no setter
onConnected Stream<IShard>
Emitted when the shard is ready.
no setter
onDisconnect Stream<IShard>
Emitted when the shard encounters a connection error.
no setter
onMemberChunk Stream<IMemberChunkEvent>
Emitted when shard receives member chunk.
no setter
onResume Stream<IShard>
Emitted when the shard resumed its connection
no setter
rawEvent Stream<IRawEvent>
Raw gateway payloads. You have set dispatchRawShardEvent in ClientOptions to true otherwise stream won't receive any events. Also rawEvent is dispatched ONLY for payload that doesn't match any event built in into Nyxx.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shards Iterable<IShard>
List of shards
no setter
totalNumShards int
Total number of shards for this client
no setter

Methods

dispose() Future<void>
Perform cleanup
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setPresence(PresenceBuilder presenceBuilder) → void
Sets presences on every shard
toString() String
A string representation of this object.
inherited

Operators

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