mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01: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:
@@ -104,13 +104,13 @@ class Client extends BaseClient {
|
||||
this.presence = new ClientPresence(this);
|
||||
|
||||
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
|
||||
* <warn>This should be kept private at all times.</warn>
|
||||
* @type {?string}
|
||||
*/
|
||||
this.token = process.env.CLIENT_TOKEN;
|
||||
this.token = process.env.DISCORD_TOKEN;
|
||||
} else {
|
||||
this.token = null;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class ShardingManager extends EventEmitter {
|
||||
totalShards: 'auto',
|
||||
respawn: true,
|
||||
shardArgs: [],
|
||||
token: null,
|
||||
token: process.env.DISCORD_TOKEN,
|
||||
}, options);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user