mirror of
https://github.com/danbulant/discord.js
synced 2026-07-08 12:40:50 +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 {
|
class Shard {
|
||||||
constructor(manager, id) {
|
constructor(manager, id) {
|
||||||
|
/**
|
||||||
|
* The manager of the spawned shard
|
||||||
|
* @type {ShardingManager}
|
||||||
|
*/
|
||||||
this.manager = manager;
|
this.manager = manager;
|
||||||
|
/**
|
||||||
|
* The shard id
|
||||||
|
* @type {number}
|
||||||
|
*/
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
/**
|
||||||
|
* The process of the shard
|
||||||
|
* @type {process}
|
||||||
|
*/
|
||||||
this.process = childProcess.fork(path.resolve(this.manager.file), [id, this.manager.shards.size]);
|
this.process = childProcess.fork(path.resolve(this.manager.file), [id, this.manager.shards.size]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue