mirror of
https://github.com/danbulant/discord.js
synced 2026-06-04 23:31:04 +00:00
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:
parent
3298ea1869
commit
32b405a5be
2 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue