Improve docs a bit

This commit is contained in:
Crawl
2017-04-30 04:30:44 +02:00
parent 3f8c0a4d11
commit ac92d2cecc
83 changed files with 716 additions and 711 deletions

View File

@@ -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) {