mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
Merge branch 'master' into voice-rewrite
This commit is contained in:
@@ -70,11 +70,10 @@ class Client extends BaseClient {
|
|||||||
this.voice = !browser ? new ClientVoiceManager(this) : null;
|
this.voice = !browser ? new ClientVoiceManager(this) : null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The shard helpers for the client
|
* Shard helpers for the client (only if the process was spawned from a {@link ShardingManager})
|
||||||
* (only if the process was spawned as a child, such as from a {@link ShardingManager})
|
|
||||||
* @type {?ShardClientUtil}
|
* @type {?ShardClientUtil}
|
||||||
*/
|
*/
|
||||||
this.shard = !browser && process.send ? ShardClientUtil.singleton(this) : null;
|
this.shard = !browser && process.env.SHARDING_MANAGER ? ShardClientUtil.singleton(this) : null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All of the {@link User} objects that have been cached at any point, mapped by their IDs
|
* All of the {@link User} objects that have been cached at any point, mapped by their IDs
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ class Shard extends EventEmitter {
|
|||||||
* @type {Object}
|
* @type {Object}
|
||||||
*/
|
*/
|
||||||
this.env = Object.assign({}, process.env, {
|
this.env = Object.assign({}, process.env, {
|
||||||
|
SHARDING_MANAGER: true,
|
||||||
SHARD_ID: this.id,
|
SHARD_ID: this.id,
|
||||||
SHARD_COUNT: this.manager.totalShards,
|
SHARD_COUNT: this.manager.totalShards,
|
||||||
CLIENT_TOKEN: this.manager.token,
|
CLIENT_TOKEN: this.manager.token,
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class Channel extends Base {
|
|||||||
* @example
|
* @example
|
||||||
* // Delete the channel
|
* // Delete the channel
|
||||||
* channel.delete()
|
* channel.delete()
|
||||||
* then(console.log)
|
* .then(console.log)
|
||||||
* .catch(console.error);
|
* .catch(console.error);
|
||||||
*/
|
*/
|
||||||
delete() {
|
delete() {
|
||||||
|
|||||||
Reference in New Issue
Block a user