mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 10:03:31 +01:00
docs(sharding): ShardingManager#createShard doesn't spawn the s… (#3875)
* Fixed createShard() to show an example! * docs(ShardingManager): clarify createdShard docs * docs(Shard): clarify manager parameter * docs(ShardingManager): use an info tag for createShard's param Co-Authored-By: Sugden <28943913+NotSugden@users.noreply.github.com> Co-authored-by: SpaceEEC <spaceeec@yahoo.com> Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
This commit is contained in:
@@ -143,10 +143,11 @@ class ShardingManager extends EventEmitter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Spawns a single shard.
|
||||
* @param {number} [id=this.shards.size] ID of the shard to spawn -
|
||||
* **This is usually not necessary to manually specify.**
|
||||
* @returns {Shard}
|
||||
* Creates a single shard.
|
||||
* <warn>Using this method is usually not necessary if you use the spawn method.</warn>
|
||||
* @param {number} [id=this.shards.size] ID of the shard to create
|
||||
* <info>This is usually not necessary to manually specify.</info>
|
||||
* @returns {Shard} Note that the created shard needs to be explicitly spawned using its spawn method.
|
||||
*/
|
||||
createShard(id = this.shards.size) {
|
||||
const shard = new Shard(this, id);
|
||||
|
||||
Reference in New Issue
Block a user