mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 13:03:31 +01:00
document shard
This commit is contained in:
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]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user