Skip to content

Commit 9d747d1

Browse files
authored
docs(Client): fix docs for login method (#4350)
1 parent 124afeb commit 9d747d1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/client/Client.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ class Client extends BaseClient {
135135
Object.defineProperty(this, 'token', { writable: true });
136136
if (!browser && !this.token && 'DISCORD_TOKEN' in process.env) {
137137
/**
138-
* Authorization token for the logged in bot
138+
* Authorization token for the logged in bot.
139+
* If present, this defaults to `process.env.DISCORD_TOKEN` when instantiating the client
139140
* <warn>This should be kept private at all times.</warn>
140141
* @type {?string}
141142
*/
@@ -195,7 +196,7 @@ class Client extends BaseClient {
195196

196197
/**
197198
* Logs the client in, establishing a websocket connection to Discord.
198-
* @param {string} token Token of the account to log in with
199+
* @param {string} [token=this.token] Token of the account to log in with
199200
* @returns {Promise<string>} Token of the account used
200201
* @example
201202
* client.login('my token');

0 commit comments

Comments
 (0)