updateOtherShards(key, val) {
    if (!this.client.shard) return;
    key = JSON.stringify(key);
    val = typeof val !== "undefined" ? JSON.stringify(val) : "undefined";
    this.client.shard.broadcastEval(`
      if(this.shard.id !== ${this.client.shard.id} && this.provider && this.provider.settings) {
        let global = this.provider.settings.get('global');
        if(!global) {
          global = {};
          this.provider.settings.set('global', global);
        }
        global[${key}] = ${val};
      }
    `);
  }
/**
   * Updates a global setting on all other shards if using the {@link ShardingManager}.
   * @param {string} key - Key of the setting to update
   * @param {*} val - Value of the setting
   * @private
   */
Updates a global setting on all other shards if using the  ShardingManager.
@param {string} key - Key of the setting to update
@param {*} val - Value of the setting
@private
Updates a global setting on all other shards if using the ShardingManager . @param { string } key - Key of the setting to update @param { * } val - Value of the setting @private
updateOtherShards(key, val) {
    if (!this.client.shard) return;
    key = JSON.stringify(key);
    val = typeof val !== "undefined" ? JSON.stringify(val) : "undefined";
    this.client.shard.broadcastEval(`
      if(this.shard.id !== ${this.client.shard.id} && this.provider && this.provider.settings) {
        let global = this.provider.settings.get('global');
        if(!global) {
          global = {};
          this.provider.settings.set('global', global);
        }
        global[${key}] = ${val};
      }
    `);
  }
updateOtherShards ( key , val ) { if ( ! this . client . shard ) return ; key = JSON . stringify ( key ) ; val = typeof val !== "undefined" ? JSON . stringify ( val ) : "undefined" ; this . client . shard . broadcastEval ( ` ${ this . client . shard . id } ${ key } ${ val } ` ) ; }
Updates a global setting on all other shards if using the {@link ShardingManager}.
Updates a global setting on all other shards if using the { @link ShardingManager } .