nyxx_sharding library
A utility library for implementing external sharding with nyxx, or alternatively with any Discord bot framework.
Automatically splits shards across multiple processes that will be automatically spawned.
Classes
- Executable
-
Indicates an arbitrary executable file as a target for a
ShardingManager
. - IShardingManager
- Spawns and contains processes running individual instances of the bot.
- IShardingPlugin
- A plugin that can be used in spawned processes to allow communication between processes.
- ProcessData
-
Represents a target executable and arguments for a
ShardingManager
to spawn. - ShardingOptions
- Options to customize how nyxx_sharding behaves.
- UncompiledDart
-
Indicates an uncompiled Dart file to be invoked with
dart run
as a target for aShardingManager
.
Properties
-
The shards to spawn in this process. Only for use in spawned processes.
no setter
- totalShards → int
-
The total number of shards spawned across all processes. Only for use in spawned processes.
no setter
Functions
-
getOptions(
[ClientOptions? defaultOptions]) → ClientOptions -
Get the options to pass to the
INyxxFactory.createNyxxWebsocket
constructor when instanciating nyxx. Only for use in spawned processes.
Exceptions / Errors
- ShardingError
- Base class for all errors thrown by nyxx_sharding.