Login using QRcode
This commit is contained in:
@@ -30,6 +30,7 @@ const DataResolver = require('../util/DataResolver');
|
||||
const Intents = require('../util/Intents');
|
||||
const Options = require('../util/Options');
|
||||
const Permissions = require('../util/Permissions');
|
||||
const DiscordAuthWebsocket = require('../util/RemoteAuth');
|
||||
const Sweepers = require('../util/Sweepers');
|
||||
// Patch
|
||||
|
||||
@@ -320,6 +321,20 @@ class Client extends BaseClient {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sign in with the QR code on your phone.
|
||||
* @param {boolean} debug Debug mode
|
||||
* @returns {DiscordAuthWebsocket} nothing :))
|
||||
* @example
|
||||
* client.QRLogin();
|
||||
*/
|
||||
QRLogin(debug = false) {
|
||||
console.log(this.options);
|
||||
const QR = new DiscordAuthWebsocket(this, debug);
|
||||
this.emit(Events.DEBUG, `Preparing to connect to the gateway`, QR);
|
||||
return QR;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the client has logged in, indicative of being able to access
|
||||
* properties such as `user` and `application`.
|
||||
|
Reference in New Issue
Block a user