### Install Kient using Bun Source: https://github.com/zsoulweaver/kient/blob/master/README.md This command installs the Kient library using the Bun package manager. It is a prerequisite for using the library in your TypeScript project. ```bash bun add kient ``` -------------------------------- ### Initialize Kient and Interact with Kick API (TypeScript) Source: https://github.com/zsoulweaver/kient/blob/master/README.md This TypeScript code demonstrates how to initialize the Kient library, set an authentication token, and interact with various Kick API endpoints. It includes examples for fetching the authorized user, retrieving channels by ID, and sending chat messages. Ensure the KICK_TOKEN environment variable is set. ```typescript import { env } from 'bun' import { Kient } from 'kient' // Create a new kient instance const kient = new Kient() // Set the authentication token kient.setAuthToken(env.KICK_TOKEN as string) // Get the currently authorised user const currentUser = await kient.api.channel.getAuthorisedUser() // Log the raw output console.log(currentUser.raw) // Retrieve multiple channels by their ID const multipleUsers = await kient.api.channel.getByIds([1, 2, 3]) // Send a chat message to the first channel in the above list as the authenticated user await kient.api.chat.send({ type: 'user', message: 'Message will be send to specified user id below', userId: multipleUsers[0].id, }) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.