From 9d747d14c5c5f28a7d608a27d2a9e91fd30b5e34 Mon Sep 17 00:00:00 2001
From: Jan <66554238+Vaporox@users.noreply.github.com>
Date: Tue, 11 Aug 2020 23:36:25 +0200
Subject: [PATCH] docs(Client): fix docs for login method (#4350)
---
src/client/Client.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/client/Client.js b/src/client/Client.js
index 4a12e8505..c7fcf2749 100644
--- a/src/client/Client.js
+++ b/src/client/Client.js
@@ -135,7 +135,8 @@ class Client extends BaseClient {
Object.defineProperty(this, 'token', { writable: true });
if (!browser && !this.token && 'DISCORD_TOKEN' in process.env) {
/**
- * Authorization token for the logged in bot
+ * Authorization token for the logged in bot.
+ * If present, this defaults to `process.env.DISCORD_TOKEN` when instantiating the client
* This should be kept private at all times.
* @type {?string}
*/
@@ -195,7 +196,7 @@ class Client extends BaseClient {
/**
* Logs the client in, establishing a websocket connection to Discord.
- * @param {string} token Token of the account to log in with
+ * @param {string} [token=this.token] Token of the account to log in with
* @returns {Promise} Token of the account used
* @example
* client.login('my token');