Add Shard#ready property and related events

This commit is contained in:
Schuyler Cebulskie
2017-11-16 22:49:38 -05:00
parent 09315ae9db
commit 196cf7652e
3 changed files with 69 additions and 14 deletions

View File

@@ -168,7 +168,7 @@ class ShardingManager extends EventEmitter {
/**
* Evaluates a script on all shards, in the context of the Clients.
* @param {string} script JavaScript to run on each shard
* @returns {Promise<Array>} Results of the script execution
* @returns {Promise<Array<*>>} Results of the script execution
*/
broadcastEval(script) {
const promises = [];
@@ -179,7 +179,7 @@ class ShardingManager extends EventEmitter {
/**
* 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>}
* @returns {Promise<Array<*>>}
* @example
* manager.fetchClientValues('guilds.size')
* .then(results => {