mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
docs(Client): fix docs for login method (#4350)
This commit is contained in:
@@ -135,7 +135,8 @@ class Client extends BaseClient {
|
|||||||
Object.defineProperty(this, 'token', { writable: true });
|
Object.defineProperty(this, 'token', { writable: true });
|
||||||
if (!browser && !this.token && 'DISCORD_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.
|
||||||
|
* If present, this defaults to `process.env.DISCORD_TOKEN` when instantiating the client
|
||||||
* <warn>This should be kept private at all times.</warn>
|
* <warn>This should be kept private at all times.</warn>
|
||||||
* @type {?string}
|
* @type {?string}
|
||||||
*/
|
*/
|
||||||
@@ -195,7 +196,7 @@ class Client extends BaseClient {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs the client in, establishing a websocket connection to Discord.
|
* 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<string>} Token of the account used
|
* @returns {Promise<string>} Token of the account used
|
||||||
* @example
|
* @example
|
||||||
* client.login('my token');
|
* client.login('my token');
|
||||||
|
|||||||
Reference in New Issue
Block a user