mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 09:33:32 +01:00
Improve docs a bit
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
const Util = require('../util/Util');
|
||||
|
||||
/**
|
||||
* Helper class for sharded clients spawned as a child process, such as from a ShardingManager
|
||||
* Helper class for sharded clients spawned as a child process, such as from a ShardingManager.
|
||||
*/
|
||||
class ShardClientUtil {
|
||||
/**
|
||||
* @param {Client} client Client of the current shard
|
||||
* @param {Client} client The client of the current shard
|
||||
*/
|
||||
constructor(client) {
|
||||
this.client = client;
|
||||
@@ -31,7 +31,7 @@ class ShardClientUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a message to the master process
|
||||
* Sends a message to the master process.
|
||||
* @param {*} message Message to send
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@@ -45,8 +45,8 @@ class ShardClientUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches a Client property value of each shard.
|
||||
* @param {string} prop Name of the Client property to get, using periods for nesting
|
||||
* Fetches a client property value of each shard.
|
||||
* @param {string} prop Name of the client property to get, using periods for nesting
|
||||
* @returns {Promise<Array>}
|
||||
* @example
|
||||
* client.shard.fetchClientValues('guilds.size').then(results => {
|
||||
@@ -91,7 +91,7 @@ class ShardClientUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles an IPC message
|
||||
* Handles an IPC message.
|
||||
* @param {*} message Message received
|
||||
* @private
|
||||
*/
|
||||
@@ -112,7 +112,7 @@ class ShardClientUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a message to the master process, emitting an error from the client upon failure
|
||||
* Sends a message to the master process, emitting an error from the client upon failure.
|
||||
* @param {string} type Type of response to send
|
||||
* @param {*} message Message to send
|
||||
* @private
|
||||
@@ -125,8 +125,8 @@ class ShardClientUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates/gets the singleton of this class
|
||||
* @param {Client} client Client to use
|
||||
* Creates/gets the singleton of this class.
|
||||
* @param {Client} client The client to use
|
||||
* @returns {ShardClientUtil}
|
||||
*/
|
||||
static singleton(client) {
|
||||
|
||||
Reference in New Issue
Block a user