mirror of
https://github.com/danbulant/discord.js
synced 2026-05-26 13:32:04 +00:00
document shard
This commit is contained in:
parent
7475f734ac
commit
0454674ceb
2 changed files with 13 additions and 1 deletions
File diff suppressed because one or more lines are too long
|
|
@ -6,8 +6,20 @@ const path = require('path');
|
|||
*/
|
||||
class Shard {
|
||||
constructor(manager, id) {
|
||||
/**
|
||||
* The manager of the spawned shard
|
||||
* @type {ShardingManager}
|
||||
*/
|
||||
this.manager = manager;
|
||||
/**
|
||||
* The shard id
|
||||
* @type {number}
|
||||
*/
|
||||
this.id = id;
|
||||
/**
|
||||
* The process of the shard
|
||||
* @type {process}
|
||||
*/
|
||||
this.process = childProcess.fork(path.resolve(this.manager.file), [id, this.manager.shards.size]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue