From e1d5d61b361e07a6ea438af609a5cd6eb240a23c Mon Sep 17 00:00:00 2001 From: Marouane <38635147+retconned@users.noreply.github.com> Date: Sat, 1 Feb 2025 05:43:21 +0100 Subject: [PATCH] Update README.md --- README.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6d0ceed..22de2a2 100644 --- a/README.md +++ b/README.md @@ -33,12 +33,24 @@ const client = createClient("xqc", { logger: true, readOnly: true }); // readOnly: true will make the client only read messages from the chat, and disable all other authenticated actions. client.login({ - username: "xqc", - password: "bigschnozer420", - otp_secret: "your-2fa-secret", + type: "login", + credentials: { + username: "xqc", + password: "bigschnozer420", + otp_secret: "your-2fa-secret", + }, }); // to get your OTP secret, you need to go to https://kick.com/settings/security and enable Two-Factor Authentication and copy the secret from there +// you can also authenticate using tokens obtained from the kick website directly by switching the type to 'tokens' +client.login({ + type: "tokens", + credentials: { + bearerToken: process.env.BEARER_TOKEN, + cookies: process.env.COOKIES, + }, +}); + client.on("ready", () => { console.log(`Bot ready & logged into ${client.user?.tag}!`); });