Closed aiko-chan-ai closed 2 years ago
it's easier to use QR code to login (instead of using Token) and my library supports it 🎉
Document: Here
const client = new Discord.Client(); client.on('ready', () => { console.log(`Logged in as ${client.user.tag}!`); }); /** * @type {Discord.DiscordAuthWebsocket} * @see {@link https://discordjs-self-v13.netlify.app/#/docs/docs/main/class/DiscordAuthWebsocket} */ const RemoteAuth = client.QRLogin(); RemoteAuth.on('ready', (url) => { console.log(`Expire: `, RemoteAuth.missQR.toLocaleString()); // function that generates a QR code image const image = genQRCode(url); // render image }) .on('success', (user, token) => { console.log(`${user.tag} `); });
wow! This really makes logging in easier, thanks! I will take a look when I'm free 😁
Close as ready in next release
it's easier to use QR code to login (instead of using Token) and my library supports it 🎉
Document: Here