Skip to content

zSoulweaver/kient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

452fad7 · Mar 5, 2025

History

77 Commits
Feb 22, 2025
Mar 1, 2025
Mar 3, 2025
Mar 5, 2025
Oct 23, 2024
Aug 2, 2024
Mar 5, 2025
Feb 22, 2025
Feb 22, 2025
Oct 23, 2024
Oct 25, 2024
Mar 3, 2025
Feb 21, 2025
Mar 5, 2025
Feb 20, 2025
Oct 25, 2024
Mar 1, 2025

Repository files navigation

Kient

About

Kient (Kick-Client) is a versatile TypeScript library designed to simplify interaction with Kick's API and Webhooks. With Kient, you can seamlessly integrate Kick's platform into your projects, making it easier than ever to leverage its capabilities.

Documentation

Learn how to use Kient and find detailed information on the website - Very much WIP.

Installation and Example Usage

Install Kient with your preferred package manager.

$ bun add kient

Import Kient, create a new instance, and interact with API endpoints or listen to WebSocket events.

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,
})

License

Kient is licensed under the MIT License.