Change default token (#2843)

* Change default token

Default `token` to `process.env.CLIENT_TOKEN` like client does.

* 2/2

* 1/2
This commit is contained in:
Shayne Hartford
2018-09-23 15:36:28 -04:00
committed by Crawl
parent 3298ea1869
commit 32b405a5be
2 changed files with 3 additions and 3 deletions

View File

@@ -104,13 +104,13 @@ class Client extends BaseClient {
this.presence = new ClientPresence(this); this.presence = new ClientPresence(this);
Object.defineProperty(this, 'token', { writable: true }); Object.defineProperty(this, 'token', { writable: true });
if (!browser && !this.token && 'CLIENT_TOKEN' in process.env) { if (!browser && !this.token && 'DISCORD_TOKEN' in process.env) {
/** /**
* Authorization token for the logged in bot * Authorization token for the logged in bot
* <warn>This should be kept private at all times.</warn> * <warn>This should be kept private at all times.</warn>
* @type {?string} * @type {?string}
*/ */
this.token = process.env.CLIENT_TOKEN; this.token = process.env.DISCORD_TOKEN;
} else { } else {
this.token = null; this.token = null;
} }

View File

@@ -31,7 +31,7 @@ class ShardingManager extends EventEmitter {
totalShards: 'auto', totalShards: 'auto',
respawn: true, respawn: true,
shardArgs: [], shardArgs: [],
token: null, token: process.env.DISCORD_TOKEN,
}, options); }, options);
/** /**