docs(RemoteAuth): Add docs
This commit is contained in:
parent
c8287282a9
commit
c794e9ac6b
File diff suppressed because one or more lines are too long
@ -56,9 +56,25 @@ class DiscordAuthWebsocket extends EventEmitter {
|
|||||||
*/
|
*/
|
||||||
constructor(client, debug = false, hideLog = false) {
|
constructor(client, debug = false, hideLog = false) {
|
||||||
super();
|
super();
|
||||||
|
/**
|
||||||
|
* Debug mode
|
||||||
|
* @type {boolean}
|
||||||
|
*/
|
||||||
this.debug = debug;
|
this.debug = debug;
|
||||||
|
/**
|
||||||
|
* Discord Client (using to automatically login)
|
||||||
|
* @type {?Client}
|
||||||
|
*/
|
||||||
this.client = client;
|
this.client = client;
|
||||||
|
/**
|
||||||
|
* Hide `console.log`
|
||||||
|
* @type {boolean}
|
||||||
|
*/
|
||||||
this.hideLog = hideLog;
|
this.hideLog = hideLog;
|
||||||
|
/**
|
||||||
|
* WebSocket connection
|
||||||
|
* @type {WebSocket}
|
||||||
|
*/
|
||||||
this.ws = new WebSocket(client?.options?.http?.remoteAuth || 'wss://remote-auth-gateway.discord.gg/?v=1', {
|
this.ws = new WebSocket(client?.options?.http?.remoteAuth || 'wss://remote-auth-gateway.discord.gg/?v=1', {
|
||||||
headers: {
|
headers: {
|
||||||
Origin: 'https://discord.com',
|
Origin: 'https://discord.com',
|
||||||
@ -78,7 +94,15 @@ class DiscordAuthWebsocket extends EventEmitter {
|
|||||||
});
|
});
|
||||||
this.heartbeat_interval = null;
|
this.heartbeat_interval = null;
|
||||||
this.connectionDestroy = null;
|
this.connectionDestroy = null;
|
||||||
|
/**
|
||||||
|
* Time remote auth url expires
|
||||||
|
* @type {Date}
|
||||||
|
*/
|
||||||
this.missQR = null;
|
this.missQR = null;
|
||||||
|
/**
|
||||||
|
* Login state
|
||||||
|
* @type {boolean}
|
||||||
|
*/
|
||||||
this.login_state = false;
|
this.login_state = false;
|
||||||
/**
|
/**
|
||||||
* User login with QR
|
* User login with QR
|
||||||
|
Loading…
Reference in New Issue
Block a user