@vxed/kick
v1.6.3
Published
An unofficial client for interacting with Kick's API.
Readme
kick
An unofficial client for interacting with Kick's API.
⚠️ This package is not affiliated with, endorsed by, or sponsored by Kick.com. Use at your own risk.
Installation
npm install @vxed/kickAuthentication
Some methods require authentication using a Kick token. You can get your token from your browser's requests after logging into Kick.com.
Features
- Subscribe to chat messages
- Send messages
- Get user profiles
- Get channel user profiles
- Ban/unban users
- Mod/unmod users
- Watch livestreams
- Fetch MODs, VIPs, OGs
Examples
Subscribe to Chat Messages
import { joinChatroom } from '@vxed/kick';
// Get the chatroom ID from the channel profile
const chatroom = joinChatroom('CHATROOM_ID');
// Listen for messages
chatroom.on('message', (message) => {
console.log(`${message.sender.username}: ${message.content}`);
});Send a Message
import { chat } from '@vxed/kick';
// Requires authentication
await chat('your-kick-token', 'channel_name', 'Hello, Kick!');Get User Profile
import { getProfile } from '@vxed/kick';
// Get a user's profile
const profile = await getProfile('username');
console.log(profile);Get Channel User Profile
import { getChannelUserProfile } from '@vxed/kick';
// Get a user's profile in a specific channel
const userProfile = await getChannelUserProfile('channel_name', 'username');
console.log(userProfile);API Reference
Chat Methods
| Method | Description | Auth Required |
|--------|-------------|---------------|
| chat(token, channel, message) | Send a message to a channel | Yes |
| joinChatroom(chatroomId) | Subscribe to chat messages | No |
User Methods
| Method | Description | Auth Required |
|--------|-------------|---------------|
| getProfile(username) | Get a user's profile | No |
| getChannelUserProfile(channel, username) | Get a user's profile in a channel | No |
Moderation Methods
| Method | Description | Auth Required |
|--------|-------------|---------------|
| ban(token, channel, username, duration?) | Ban a user from a channel | Yes |
| unmod(token, channel, username) | Remove moderator status from a user | Yes |
| mod(token, channel, username) | Make a user a moderator | Yes |
Stream Methods
| Method | Description | Auth Required |
|--------|-------------|---------------|
| userWatchLivestream(token, username) | Emit "Watch a user's livestream" event | Yes |
Fetch MODs, VIPs, OGs Users
| Method | Description | Auth Required |
|--------|-------------|---------------|
| getVIPs(channel) | Fetch Users VIPs Rank | No |
| getOGs(channel) | Fetch Users OGs Rank | No |
| getMODs(channel) | Fetch Users MODs Rank | No |
License
MIT
