mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13: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 {
|
||||
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]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user