ShardManager class

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

Properties

gatewayLatency Duration
Average gateway latency across all shards
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
onConnected Stream<Shard>
Emitted when the shard is ready.
read / write
onDisconnect Stream<Shard>
Emitted when the shard encounters a connection error.
read / write
onMemberChunk Stream<MemberChunkEvent>
Emitted when shard receives member chunk.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
shards Iterable<Shard>
List of shards
read-only

Methods

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

Operators

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