
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
kick_live_ws
Advanced tools
npm install --save kick_ws_live
import { WebSocketConnection, MessageEvents, TChatMessageEvent } from "kick_live_ws";
const kickConnection = new WebSocketConnection({name:'xQc'});
kickConnection.connect();
kickConnection.on(MessageEvents.CHATMESSAGE,(messagedata: TChatMessageEvent) => {
console.log('message',messagedata)
})
To create a new WebSocketConnection
object the following parameters are required.
WebSocketConnection({name, chatroom_id, channel_id})
Param Name | Required | Description |
---|---|---|
name | Yes | The unique username of the broadcaster. You can find this name in the URL. Example: https://kick.com/xQc => xQc |
chatroom_id | No(Both Yes) | The unique chatroom_id stays the same for every stream. Chat is also up and recieving messages when the streamer is offline. Fetch https://kick.com/api/v2/channels/xQc or CHANNEL + xQc => data.chatroom.id |
channel_id | No(Both Yes) | The unique chatroom_id stays the same for every stream. Chat is also up and recieving messages when the streamer is offline. Fetch https://kick.com/api/v2/channels/xQc or CHANNEL + xQc => data.chatroom.channel_id |
You can bypass the puppeteer getting Ids by setting chatroom_id and channel_id. Both have to be set, only 1 will not work.
A WebSocketConnection
object has the following events which can be handled via .on(eventName, eventHandler)
.
Message Events:
CHAT
Triggered everytime a new chat message arrives.
kickConnection.on(MessageEvents.CHATMESSAGE,(messagedata: TChatMessageEvent) => {
console.log('message',messagedata.content)
});
BAN
Triggered everytime a user gets banned.
kickConnection.on(MessageEvents.BAN,(banevent:TBanEvent)=>{
console.log(`User ${banevent.user} banned by ${banevent.banned_by}`)
})
DISCONNECT
Triggered everytime the websocket disconnects.
You can use this to reconnect. kickConnection will handle the reconnect and add listeners again.
kickConnection.on('disconnect', () => {
console.log('restart after disconnect')
setTimeout(() => {
kickConnection.connect();
}, 1000); // 1000 milliseconds = 1 seconds
})
Every Message event has its own type in this shema. T{STREAMSTART}Event The MessageEvents and all types can be imported
import { WebSocketConnection, MessageEvents, TChatMessageEvent, TBanEvent } from "kick_live_ws";
TFollowEvent and TPinnedMessageDeletedEvent are missing. Will be updated soon.
UNTRACKED
to look if something is not tracked and message me.Your improvements are welcome! Feel free to open an issue or pull request.
Discord: .wulfen
FAQs
just a small module to connect to Kick Websocket and read data
The npm package kick_live_ws receives a total of 5 weekly downloads. As such, kick_live_ws popularity was classified as not popular.
We found that kick_live_ws demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.